View Full Version : Alert, and then submit...

The Wizzard
01-22-2003, 12:40 AM
Javascript is my weakness :rolleyes:

Im creating a form thats connecting to my database, and will allow me to delete items from it. Currently, you click the item, and its gone. How can I make an alert popup when you click on it, and ask you if you're sure, then if you click "Ok" it deletes the item. If you click "No" nothing happens.


01-22-2003, 01:55 AM
does thisss link just a help® ya???

just a goodluck® :O)))

01-22-2003, 02:03 AM
if(confirm("Are you sure?")){
// This code runs if the user clicks "OK"
} else {
// This code runs if the user clicks "Cancel"

01-22-2003, 07:04 PM
confirm boxes are IE only i believe ..... (?)

The Wizzard
01-22-2003, 07:45 PM

cg9com, its ok, because myself & one other person will only be able to use this, its in the admin backend, and we both use IE.


Thanks again! :thumbsup:

01-23-2003, 12:03 AM
FYI, confirm boxes are NOT IE only... should work in everything, AFAIK, even work just fine in Netscape 4.78 (tested!), that's as far back as I go... ;)

01-23-2003, 01:54 PM
hai :)

i thought may be you must use window.confirm() instead.

i found this, try it may be it will give you an idea:thumbsup:

var x=window.confirm("Are you sure you are you want to delete this?")
if (x)
window.alert("Too bad")

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum