Disclaimer Messages

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Jul 2006
Posts: 4
Reputation: DanaNVB is an unknown quantity at this point 
Solved Threads: 0
DanaNVB DanaNVB is offline Offline
Newbie Poster

Disclaimer Messages

 
0
  #1
Sep 8th, 2006
I'm new to Javascript and could use a bit of advice. I''m looking for a simple way to call a Disclaimer message on a link outside our site.. ... I have tried using the confirm mesage but it still goes to the outside link when someone selects cancel. Can anyone share with me a simple script to do such a thing.

link to another site .....shows disclaimer with option to continue to link or cancel and return to previous page.

Any help is appreciated.

THANK YOU!
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 1,655
Reputation: tgreer is an unknown quantity at this point 
Solved Threads: 35
Team Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: Disclaimer Messages

 
0
  #2
Sep 8th, 2006
Research JavaScript's "return" keyword. If the user clicks cancel, you want to "return false" from your procedure, which will cancel the default action and/or exit the script.

So, you have a "submit" button. You code the "onclick" event handler, to a function which issues a confirm. If the user presses "Cancel", you return a "false" which cancels the submit.

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <input type="submit" onclick="return myConfirmFunc();" />
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC