Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

onclick not working in firefox.....

  • 26-07-2007 5:42pm
    #1
    Closed Accounts Posts: 2,349 ✭✭✭


    http://tcoppinger.com/new/

    onclick on the about us link should link to another page, it works in IE but not in firefox. I can't get it to do anything.

    I'm so sick of this cross-browser crap!


Comments

  • Registered Users, Registered Users 2 Posts: 2,591 ✭✭✭tommycahir


    I have heard some claims that it is better to use
    self.location.replace(url)
    instead of
    self.location.href = url

    It might be worth a try.


  • Registered Users, Registered Users 2 Posts: 1,393 ✭✭✭Inspector Gadget


    I think the more standard way to do this is to replace:
    <img src="Aboutus.gif" onclick="self.location.href = 'index2.html'" alt="About Us" />
    

    With:
    <a href="index2.html"><img src="Aboutus.gif" border="0"/></a>
    

    Does that help?
    Gadget


  • Closed Accounts Posts: 2,349 ✭✭✭nobodythere


    Well it will be calling a javascript function, i only changed it to self.location.href so see if something as simple as that would work.

    OnClick doesn't seem to be firing at all. Works in IE/Opera/Safari. Maybe I should report it...


  • Registered Users, Registered Users 2 Posts: 1,481 ✭✭✭satchmo


    It's something to do with the last entry in your css file.


  • Users Awaiting Email Confirmation Posts: 351 ✭✭ron_darrell


    I think the more standard way to do this is to replace:
    <img src="Aboutus.gif" onclick="self.location.href = 'index2.html'" alt="About Us" />
    

    With:
    <a href="index2.html"><img src="Aboutus.gif" border="0"/></a>
    

    Does that help?
    Gadget
    Couldn't agree more. Why do people go out of there way to make things difficult? If you really, really have to have an onclick event (and btw if you do use an onclick instead of an <a> tag then the page will not work at all if the user has scripting disabled) then the correct code is:
    window.location = url;
    


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,393 ✭✭✭Inspector Gadget


    grasshopa wrote:
    Well it will be calling a javascript function, i only changed it to self.location.href so see if something as simple as that would work.

    OnClick doesn't seem to be firing at all. Works in IE/Opera/Safari. Maybe I should report it...

    The "nice" way of doing that is:
    <a href="#" onclick="function_i_want_to_call(optional_parameters)><img border="0" src="path_to_image.gif"></a>
    

    (The href="#" thing is there just for neatness)

    Hope this helps,
    Gadget


  • Registered Users, Registered Users 2 Posts: 378 ✭✭sicruise


    Stick the image in a div and use the onclick with the div...


  • Closed Accounts Posts: 68 ✭✭nuada


    the div after the menu div on the page is resting on top of the menu div and so the click events are going to that div instead. add z-index:-1 to it's style to send it to the back
    <div style="z-index:-1; position: relative; top: 50%; margin-top: -200px; padding-left: 166px; margin-left: 10%;">
      <div id="photograph">
    


  • Closed Accounts Posts: 2,349 ✭✭✭nobodythere


    I owe you a hug, legend.


Advertisement