View Full Version : Change the background of an empty table cell when a link on other cell is clicked
Hi ,
Can anybody suggest as to how to go about when--
the background of an empty table cell has to be changed when a hyperlink on another table cell is clicked.
The background has to be changed either by using colour/image or class .
Rads
Jim D'Amato
12-18-2005, 02:38 AM
Try something like this:
<table width="200"><tr>
<td id="empty" width="100">
<td width="100"><a href="#" onclick="document.getElementById('empty').style.backgroundColor = 'red';">Click the link</a></td></tr></table>
When you click the link the background of the other table cell should change to red.
Jim
sleipner
12-25-2005, 11:38 AM
cant remember where it was, but there was a javascript forum post here on dd about how to do this, i think the answer i used was given by jscheurer on that thread (like i said, cant remember which, try searchin for it)
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.