NerdConcepts Posted December 24, 2007 Share Posted December 24, 2007 I've got the following code, and well when you mouse over the link it doesn't change the td class that I am trying to do. When you see the code you'll understand. Sorry, I'm a little new to javascript. <style type="text/css"> td.c0 { background: url(photos/temp.jpg) no-repeat 0 0; height: 68px; width: 178px; border: 1px solid #000000; padding: 0 none; } td.c10 { background: url(photos/temp.jpg) no-repeat 0 -10px; height: 68px; width: 178px; border: 1px solid #000000; padding: 0 none; } </style> <table border="0" cellpadding="0" cellspacing="0" align="center"> <tr valign="top"> <td> <table border="0" cellpadding="0" cellspacing="0" style="padding-right: 10px;"> <tr> <td class="c0" id="imagechange"> </td> </tr> </table> <center><div class="galleryTitle"><a href="">Alignment Example</a></div></center> </td> <td> <u>Icon Alignment</u>:<br /> <a href="" onmouseover="imagechange.className='c10'" onmouseout="imagechange.className='c0'">Top</a> </td> </tr> </table> Link to comment https://forums.phpfreaks.com/topic/83020-solved-stupid-onmouseover-question/ Share on other sites More sharing options...
rajivgonsalves Posted December 24, 2007 Share Posted December 24, 2007 this imagechange.className should be something like... document.getElementById('imagechange').style.className I think that should work!! Link to comment https://forums.phpfreaks.com/topic/83020-solved-stupid-onmouseover-question/#findComment-422278 Share on other sites More sharing options...
NerdConcepts Posted December 24, 2007 Author Share Posted December 24, 2007 it's actually: document.getElementById('imagechange'.className just have to leave out the ".style" But it works perfectly now...thanks a bunch! Link to comment https://forums.phpfreaks.com/topic/83020-solved-stupid-onmouseover-question/#findComment-422296 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.