I use prototype (hence the $() tag and the show()/hide()) for it. This could be with a onclick handler like tsvanharen posted, or with a simple text dialog inside the page instead of a nagging popup. The javacript way is probably a bit easier, but remember when javascript is turned off, this does not work (except if you check javascript to be enabled and then add this!?) The PHP way of doing this would be using a dialog system inside php.for example GTKDialogs: Then, in the page with the delete link, I add an onclick function (or just use the jQuery confirm plugin) that uses AJAX to post to the link, bypassing the confirmation page.ĭoAjax(link.href, "POST") // doAjax needs to send the "confirm" field What I usually do is create a delete page that shows a confirmation form if the request method is "GET" and deletes the data if the method was "POST" and the user chose the "Yes" option.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |