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!

Highlight a position in a table

Status
Not open for further replies.

rewdee

Programmer
Aug 17, 2001
295
US
Hi All

I have a image with a number of hotspots on them. I would like to write something that when they click the hotspot it would take them to a particular cell in a table. This part I have done by bookmarking all potential spots. However, I would like to highlight the cell that is bookmarked. How do I do that? Any help or suggestions would greatly be appreciated.

Thanks,
Rewdee
 
Hi rewdee,

This is probably not exxactly what you ask, but I think it's a start. With some suggestion from other members we should solve your problem. I'm not sure if "onfocus " is what you need, but maybe there is another attribute.

Just try this script and see what happens when you get the focus on the cell:

<script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;>

function highlight(cell)
{
cell.bgColor = '#ffff00';
}
</script>

and in your table:
<td onfocus=&quot;highlight(this)&quot;>blabla</td>

Good luck,
Erik
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top