PDA

View Full Version : Click a table cell, and redirect???


QuackHead
12-24-2002, 03:29 PM
Hey,

I have a table cell that has some mouse effects in it (onMouseOver etc.) and I would like to know if it's possible that when I click anywhere in that cell, (using the onClick event I guess) that the page would be redirected based upon the link that is in that cell.

For example:

<tr><td id="test1" onMouseOver="mOver(this.id);" onMouseOut="mOut(this.id);" onClick="?????">
<a href="test2.htm">this is my link</a>
</td></tr>

Anyone know how clicking anywhere in that cell would redirect to my page (in this exampl it's "test2.htm")

Thanks for your help!

~Quack

ez4me2c3d
12-24-2002, 03:52 PM
i do believe onClick="window.location='test2.htm'" would work... i'll run a test and confirm

EDIT: confirmed

QuackHead
12-24-2002, 03:54 PM
oh, I know that would work, but I was wondering if there's a way that I don't have to hard code the link....

so, if I changed the link, it'd still go

ez4me2c3d
12-24-2002, 06:12 PM
oh so that it pulls the page to redirect to from the a <A> tag within the cell?

QuackHead
01-02-2003, 04:09 PM
Yeah, that's essentially what I'm looking for.

IF anyone has some hints, please let me know, I'm still trying to find a solution for this (haven't been working too hard on it since I've been on holidays for the past week ... ;))

Later

~Quack