SitePoint Sponsor

User Tag List

Results 1 to 1 of 1
  1. #1
    Hikari silver trophy artistsneverdie's Avatar
    Join Date
    Oct 2004
    Location
    essex, uk
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Stopping Auto Scroll Back to top of screen when using Javascript...

    Hi guys,

    Just wondering if there's anyway to stop the screen auto scrolling back to the top when clicking on a null hyperlink (i.e. using # in the link href), as I'm using javascript attached to this null link to alter the image source and don't want the web page bouncing back to the top every time a link is clicked. Basically it's for a small image gallery.

    I combatted it by using "javascript:" in the link href instead, this works fine in IE, but brings up a javascript console in FireFox.

    Any ideas would be gratefully received as I'm looking to launch this site asap.

    Thx.

    *edit*

    Resolved using javascript :;

    I'd missed out the ";"!
    Last edited by artistsneverdie; Sep 20, 2006 at 08:04.
    www.hikaridesign.com | Contemporary Design
    Won some awards here once upon a time...


Bookmarks

Posting Permissions

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