humphrey88 0 Report post Posted August 19, 2006 Anyone care to share how I can add a simple promt for asking the user:"Are You Sure You Want to do This?" on submit.....<%'show Remove Expired button if Mike is logged inIf realtor("ID")=1 ThenResponse.Write("<FORM ACTION='mainmenu.asp' METHOD='post'>")Response.Write("<INPUT type='submit' name='S2' value='Remove Expired'>")Response.Write("</FORM>")End If%>Something like onsubmit="Are You Sure?" Share this post Link to post Share on other sites
vujsa 0 Report post Posted August 19, 2006 Anyone care to share how I can add a simple promt for asking the user:"Are You Sure You Want to do This?" on submit.....<%'show Remove Expired button if Mike is logged inIf realtor("ID")=1 ThenResponse.Write("<FORM ACTION='mainmenu.asp' METHOD='post'>")Response.Write("<INPUT type='submit' name='S2' value='Remove Expired'>")Response.Write("</FORM>")End If%>Something like onsubmit="Are You Sure?"Well, I know how to do this in JavaScript which is pretty straight forward.Somewhere in the head of the document add:<script language="JavaScript"><!--function confirm(){ window.alert("Are you sure you want to do this?");}// --></script> Then in you submit button tag add:onclick="confirm()" That will pop up a little box asking the question you want.For any other method of performing the same task, I don't know a better way. This is exactly the kind of thing JavaScript was designed for origially. There are more elaborate JavaScript techniques availible but require more line of code.As far as a server side script, you would have to place it between the form and the main script. Basically submit the form contents to the confirmation script. The confirmation script builds a new form with all of the values from the first form PLUS the confirmation question. The confirmation form then passes the content from the first form to the second script. The second script is the one you already have it looks like.I'm not an ASP guy so I can't give you the specifics for your situation.Hope This Helps.vujsa Share this post Link to post Share on other sites