Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    308
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Making a table cell clickable with Mozilla/Firefox

    <td onclick="JavaScript:window.location.assign('http://www.mydomain.net/');">Content</td>

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

    Ash

  • #2
    New Coder
    Join Date
    Dec 2003
    Location
    At work...still
    Posts
    57
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    Last edited by WillGibson; 12-22-2004 at 07:46 PM.
    Why?
    Ok, but Why?

  • #3
    Regular Coder
    Join Date
    Oct 2004
    Posts
    168
    Thanks
    0
    Thanked 5 Times in 5 Posts
    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>

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    308
    Thanks
    0
    Thanked 0 Times in 0 Posts
    How can I make it so that the cursor changes to the hand?

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    308
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Nevermind, adding this worked:

    cursor: pointer;


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •