Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change color

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
hello,

I have in my HTML page a set of pictures and their description, these are included in a little frame and I'd like to change the color in the frame when I click on a picture. I tried with onClick="this.bgcolor=othercolor", this.background-color but it doesn't work! Help me please!

Here is my HTML code:

<span class=&quot;cellImg2&quot; >

<A onmouseover=&quot;slideit(};&quot; onmouseout=&quot;permut()&quot;>
<img border=&quot;0&quot; height=&quot;82&quot; width=&quot;100&quot; onClick=&quot;ShowSubject();&quot; align=&quot;absMiddle&quot;>

<script>
imgsource()
</script>

</img></A> <table>
blabla description of the picture </table>

</span>
 
try:

idofitemsbackground.style.backgroundColor='somecolor'

notice the mixed (camel) case of background color. Typically, when a CSS attribute is scripted, it loses its dash and ends up being mixed case. jared@aauser.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top