astralaaron Posted June 25, 2008 Share Posted June 25, 2008 This is more of a Javascript question, but a perfect example is inside of phpMyAdmin.when you click the red X to the left of a row to delete it, a javascript confirmation box comes up and asks you if you are sure you want to delete.how do you make a confirm box pop up like that? and how do you use it in the middle of a php loop like they are doing in phpMyAdmin where each row has a red X Link to comment Share on other sites More sharing options...
justsomeguy Posted June 25, 2008 Share Posted June 25, 2008 My version of phpMyAdmin doesn't do that, so I can't check the source code to see what it's doing, but it's probaby using a confirm box for the onclick handler on the link.<a href="delete.php?id=1" onclick="return confirm('really?');">delete</a> Link to comment Share on other sites More sharing options...
astralaaron Posted June 25, 2008 Author Share Posted June 25, 2008 My version of phpMyAdmin doesn't do that, so I can't check the source code to see what it's doing, but it's probaby using a confirm box for the onclick handler on the link.<a href="delete.php?id=1" onclick="return confirm('really?');">delete</a>what would the javascript function look like? Link to comment Share on other sites More sharing options...
justsomeguy Posted June 25, 2008 Share Posted June 25, 2008 confirm is a builtin function, like alert or prompt. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.