Trying to use return false to not allow link to be accessed after onclick event is fired.

Discussion in 'Javascript' started by Terry, Oct 15, 2007.

  1. Terry

    Terry Guest

    Hi people.

    I took on a job where the client wanted his banner to show up at the
    bottom of the browser 30 seconds after the document has loaded. He
    also wanted the ability for the banner to be closed if the user clicks
    on close.

    I tried <a href="" onclick='closeAd(); return false'>Close</a>

    but with no luck the link is still accessed and the page is therefore
    reloaded.

    The url is http://theamazing.onlinewebshop.net/traditional/traditional-kitchens.html

    Thanks,
    Terry
    Terry, Oct 15, 2007
    #1
    1. Advertising

  2. Re: Trying to use return false to not allow link to be accessed afteronclick event is fired.

    Terry wrote:
    > I tried <a href="" onclick='closeAd(); return false'>Close</a>
    >
    > but with no luck the link is still accessed and the page is therefore
    > reloaded.
    >
    > The url is http://theamazing.onlinewebshop.net/traditional/traditional-kitchens.html


    WFM. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7)
    Gecko/20070914 Firefox/2.0.0.7


    PointedEars
    --
    Prototype.js was written by people who don't know javascript for people
    who don't know javascript. People who don't know javascript are not
    the best source of advice on designing systems that use javascript.
    -- Richard Cornford, cljs, <f806at$ail$1$>
    Thomas 'PointedEars' Lahn, Oct 15, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stan
    Replies:
    1
    Views:
    2,521
    Jacob Yang [MSFT]
    Dec 3, 2003
  2. Chilá
    Replies:
    0
    Views:
    130
    Chilá
    Sep 21, 2005
  3. Jake Barnes
    Replies:
    1
    Views:
    167
  4. Replies:
    11
    Views:
    293
    Thomas 'PointedEars' Lahn
    Dec 11, 2006
  5. Terry
    Replies:
    6
    Views:
    158
    Thomas 'PointedEars' Lahn
    Oct 22, 2007
Loading...

Share This Page