Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

JavaScript trouble

Jul 25, 2008 6:08AM PDT

I have a quick question, I am using some javascript for a table of mines in the web page, and it makes each image appear opaque until the user runs its mouse over it, and then the image lights up. I was wondering how would I go about making it so that the the image stays lit up according to whatever web page the user is currently on? Would I need an asp code or something for this?

Discussion is locked

- Collapse -
innerHTML
Jul 25, 2008 6:39AM PDT

1. Place the image in a div, e.g.
<div id="myImg">Your opaque image goes here</div>

2. Use onmouseover to call a function, which changes the content of the div with innerHTML. You may or may not need to change the opacity to 1.

- Collapse -
innerHTML
Jul 28, 2008 11:20PM PDT

I'm lost. The image is opaque because of a code that I included. I guess in that case, how would I go about making the image opaque with a picture editing program.

- Collapse -
See this, then do some home work
Aug 13, 2008 10:33AM PDT