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 4 of 4
  1. #1
    New Coder
    Join Date
    Feb 2004
    Location
    California
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts

    href not hrefing

    Hey guys... I'm havin some problems with this site of mine. It's completely image based, so the links for login, logout, etc are javascript controlled. Links for em look like this:

    Code:
    <a onmouseover="changeImages('top_nav_08','Images/Top_Nav/new_user_over_08.gif');return true" onmouseout="changeImages('top_nav_08','Images/Top_Nav/new_user_08.gif');return true" href="index.php?do=logout"><img id="top_nav_08" src="Images/Top_Nav/new_user_08.gif"></a>
    There's some other attributes I took out to make it smaller here on the forums, but the problem I am having is for the href. When I click this, the URL changes, meaning it goes to index.php?do=logout, but the PHP script I have for it doesn't get triggered till you click it again.

    I don't think it's my PHP script cause it works the second time around.

    Any ideas? Thanks!

  • #2
    Regular Coder
    Join Date
    Jul 2004
    Location
    engoku no anime
    Posts
    354
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Have you tried applying the onmouseover and onmouseout events to the img tag instead?

  • #3
    New Coder
    Join Date
    Feb 2004
    Location
    California
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hm, no... never thought about it. I'll give it a try.

  • #4
    New Coder
    Join Date
    Feb 2004
    Location
    California
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hmm... turns out it was my PHP.. Thanks for the quick reply though, Gohankid.


  •  

    Posting Permissions

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