Confirm Dialog Box
Posted on 2004-04-07
I'm trying to add a confirm dialog box to my asp page. I've never used this before and I've tried using the following but the asp code runs whether I click yes or no:
msg = "Yes or No?"
msgTitle = "Question"
If MsgBox(msg, vbYesNo, msgTitle) = vbYes Then
'if yes was clicked
<%varSQL = "DELETE FROM tips_TipDetails WHERE intTipID = " & request("ID")
If I click yes, the yes box apears and the record is deleted. If I click No, the No box appears and the record is also deleted.
I could be completely on the wrong track here so any ideas on how to do this sort of thing would be appreciated.