kts Posted October 23, 2008 Share Posted October 23, 2008 Like the title says, im trying to click a td cell and change the other table's td cell bg color. I have this page, and it didn't work out like I wanted. www.ktshannon.com/test/test.html here is code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>click test</title> <style type="text/css"> <!-- body { background-color: #009900; } #tableblue { background-color:#0066CC; } .eek { background-color:#FFFFFF; } .over { background-color:#D0C0A9; padding-top: 2px; padding-bottom:2px;} .out { background-color: #009900; padding-top: 2px; padding-bottom:2px;} .over2 { background-color:#FF00FF; padding-top: 2px; padding-bottom:2px;} --> </style></head> <body> <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FF0000"> <tr> <td class="out" onMouseOver="this.className='over'" onMouseOut="this.className='out'" ><div id="eek" style="visibility:inherit;top:167px;left:650px;z-index:5;width:171;height:125"><img src="image2.gif" width="310" height="450" border="0" id="Picture24" /></a></div></td> </tr> </table> <table width="100" border="0"> <tr> <td bgcolor="#FF00FF" onMouseOver="eek.className='over2'" onMouseOut="eek.className='out'"> </td> <td bgcolor="#00FFFF"> </td> <td bgcolor="#0000FF"> </td> </tr> <tr> <td bgcolor="#00FF00"> </td> <td bgcolor="#FFFF00"> </td> <td bgcolor="#FF0000"> </td> </tr> <tr> <td bgcolor="#666666"> </td> <td bgcolor="#000000"> </td> <td bgcolor="#FFFFFF"> </td> </tr> </table> <p><a href="#">click here to change the red to blue</a></p> </body> </html> Link to comment https://forums.phpfreaks.com/topic/129696-solved-trying-to-make-one-table-td-clicked-change-another-tables-td-color/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.