SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: JavaScript/PHP Alert
-
Nov 8, 2003, 18:32 #1
JavaScript/PHP Alert
Say a user has a list of submitted stories, and he wants to delete one. He's viewing the list, and he clicks the DELETE button next to the desired submission. What would I need to do so that once the button (text link) is clicked, an javascript alert will be triggered, and if OK is clicked, the submission will be deleted, and if Cancel is clicked, the alert will close and nothing will happen.
Thanks,
-
Nov 8, 2003, 19:21 #2
- Join Date
- May 2003
- Posts
- 1,843
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
<a href="delete_story.php?story=3" onclick="if (confirm('Delete this story?'))document.form_name.submit();return false;">Delete Story</a>
The href calls php for JS-disabled users (or asp, jsp, etc.).::: certified wild guess :::
Bookmarks