...

View Full Version : Making a table cell clickable with Mozilla/Firefox



AshleyQuick
12-22-2004, 06:33 PM
<td onclick="JavaScript:window.location.assign('http://www.mydomain.net/');">Content</td>

This works in IE but not Firefox. Is there a solution?

Ash

WillGibson
12-22-2004, 06:43 PM
It worked for me.

Tried it in IE6, Firefox (0.9.3), Opera (7.54) and Mozilla (1.7.2). Worked in all of them for me. I maybe a bit behind on my versions :)

Puffin the Erb
12-22-2004, 06:47 PM
Gecko based browsers do allow you to onclick table cells. It is probably a problem with assign() which is originally Microsoft.

These will work:

<td onclick="javascript:window.location = 'whitespace.htm';">Content</td>

<td onclick="javascript:window.location.href = 'whitespace.htm';">Content</td>

<td onclick="javascript:window.location.replace('whitespace.htm');">Content</td>

AshleyQuick
12-22-2004, 06:53 PM
How can I make it so that the cursor changes to the hand?

AshleyQuick
12-22-2004, 06:55 PM
Nevermind, adding this worked:

cursor: pointer;



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum