944,038 Members | Top Members by Rank

Ad:
Sep 8th, 2006
0

Disclaimer Messages

Expand Post »
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!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
DanaNVB is offline Offline
4 posts
since Jul 2006
Sep 8th, 2006
0

Re: Disclaimer Messages

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();" />
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Change left-border of a table cell with javascript
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: DHTML Menu





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC