PDA

View Full Version : Redirect onclick within table (Or span)...


lazy
04-11-2007, 04:19 AM
Hi all.

Could anyone tell me if there's an alternative to the following without Javascript?

<td onclick="javascript:window.open('http://www.google.com','_self');">

(Some stuff here... hyperlinks etc)

</td>

I want a table cell to redirect somewhere if a user clicks anywhere within it, although I'd like to do this without Javascript for compatibility.

Thanks!

BonRouge
04-11-2007, 09:03 AM
See if this helps at all: http://bonrouge.com/~tablemenus

lazy
04-11-2007, 09:24 AM
Thank you for the suggestion, but I don't think that would work (Then again I am not too experienced here). The code from that page is:

<td><a href="#n">first link</a></td>

So in my situation, using this code, I would have to nest a hyperlink within a hyperlink...

BonRouge
04-11-2007, 09:28 AM
Yeah, you're right. I didn't realise that you wanted two different links...
Well, you need javascript to do what you're trying to do there.