SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Threaded View

  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2001
    Location
    New Orleans
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    trying to get link to not go to the top

    Hello,

    I'm trying to create a contact page in javascript that will list the phone numbers and other contact information of each individual of the company when clicked. I read up on javascript and through some simple additions to other scripts, i've made mine work how I want.

    Except for one thing.

    Since my javascript is using an onclick function, I set the href as '#' as most people would do. The problem is that, say, a member of the company would be far down along the page, requiring the user to scroll down. If the user was to click on this person, the page would reload, going all the way back to the top, forcing the user to scroll down again to get the information he/she wanted.

    What I want to know is if there is a way that when a user clicks on a link so that it doesn't have to scroll all the way back up to the top of the page like that, but to remain where it is.

    Anyone know anything about this?



    EDIT: NM, I am just stupid. I just used a <span> tag instead of linking it. Duh....
    Last edited by Joseph Ellis; Jul 30, 2003 at 09:53.


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
  •