Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pop up boxes? 1

Status
Not open for further replies.

taval

Programmer
Jul 19, 2000
192
GB
I currently have a submit button on an asp page. If the button is clicked I want a pop-up confirmation box that says &quot;Are you sure you want to update this record&quot;, if the user clicks &quot;OK&quot; then the next asp page is called otherwise nothing happens?<br><br>Grateful for any help.<br>Thankx
 
this was submited to another post concerning popups of the same question:<br><br><FONT FACE=monospace><br>wduty (Programmer)<br>You can use the location like Karl suggested or you can return the value of the pop-up (which will be true or false) to the link with an onClick:<br><br>&lt;html&gt;<br>&lt;head&gt;<br>&lt;script language=&quot;JavaScript&quot;&gt;<br>function confirmGo()<br>&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;var goBOOL = confirm(&quot;continue?&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;return goBOOL;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>&lt;/script&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>&lt;a href=&quot;<A HREF=" TARGET="_new"> onClick=&quot;return confirmGo();&quot;&gt;GO&lt;/a&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;<br><br>I'm not sure what you mean by the asp code being run anyways. Do you mean in the target page?<br><br>--Will Duty<br><A HREF="mailto:wduty@radicalfringe.com">wduty@radicalfringe.com</A><br></font> <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
 
Looks like some extra semi-colons got mixed in there accidentally - be sure to remove those if you use this. <br><br>Also, note that this will only work if the user CLICKS on the link. If the user uses the <i>tab key</i> (which is rather highly uncommon) and moves to the link manually and presses enter, I believe the link would go forward without a prompt. You could try adding onKeyPress or use location=&quot;thelink&quot; in the javascript if it's absolutely crucial. <p>--Will Duty<br><a href=mailto:wduty@radicalfringe.com>wduty@radicalfringe.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top