#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    456
    Rep Power
    15

    Red face


    Here is a link I have on my page:

    <a href="#" onClick="hide('rateLayer')">click here</a>

    I use it to call a javascript function, but it allows has another effect. The link is on the bottom of a page so when it is clicked, the href="#" causes the page to scroll back up to the top.

    Can someone show me how to re-write the link so this doesn't happen? I think you can do href="javascript:" or something like that.

    Thanks!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Location
    Colorado
    Posts
    46
    Rep Power
    14
    You could try some code like this:

    <a href=javascript:hide('rateLayer')>click here</a>

    Hope that helps.
    - MW
  4. #3
  5. No Profile Picture
    CF sMod
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Maine, USA (a.k.a. Boonies)
    Posts
    242
    Rep Power
    15
    Here are some methods to making a dead link:

    <a href="javascript:void(null)">
    <a href="javascript:void(0);">
    <a href="javascript://">
    <a href="thisPartDoesntMatter" onclick="return false">

    Jason Contact Me
    Super moderator @ CodingForums

IMN logo majestic logo threadwatch logo seochat tools logo