Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Javascript only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Member List
Calendar
Today's Posts
Home
Forum
Topic
Javascript
How to show confirm dialog when click a hyperlink in javascript
How to show confirm dialog when click a hyperlink in javascript
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
dagam3rz
New Member
Join Date:
Jul 2010
Posts:
11
#1
How to show confirm dialog when click a hyperlink in javascript
Jul 12 '10, 05:01 PM
I want to as the user to confirm if he really want to view the page. So what how would I do that in javascript.
Thanks in advance and have a great day!
improvcornartist
Recognized Expert
Contributor
Join Date:
May 2007
Posts:
303
#2
Jul 12 '10, 06:55 PM
You could use the javascript confirm function. For example, to confirm a link you should be able to do something like
Code:
<a href="http://bytes.com" onclick="return confirm('Are you sure?');">Bytes</a>
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
👍
👎
☕
Comment