Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Trying to use return false to not allow link to be accessed after onclick event is fired.

Reply
Thread Tools

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

 
 
Terry
Guest
Posts: n/a
 
      10-15-2007
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/...-kitchens.html

Thanks,
Terry

 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      10-15-2007
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/...-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$(E-Mail Removed)>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to use return false to not allow link to be accessed after onclick event is fired Terry Javascript 6 10-21-2007 11:25 PM
onclick="alert('hello');return false;" does not work in IE7? alvin.yk@gmail.com Javascript 11 12-11-2006 01:41 AM
False positive, false intrusion, false alarm Nick Computer Security 3 04-26-2006 07:40 PM
"return false" gives a blank page with the word "false" ? kurtj@ev1.net Javascript 10 02-16-2006 04:13 PM
in a link onclick="someFunction(); return false;" should keep the browser from following the link? Jake Barnes Javascript 1 02-15-2006 05:26 AM



Advertisments