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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Popup box in asp?

Status
Not open for further replies.

cdelaney

Programmer
Mar 2, 2000
8
CA
I need to have popup box displayed using asp when a user clicks on a link.&nbsp;&nbsp;If the user clicks OK then they will be forwarded to another page but if they click cancel they will stay at the page they are on.&nbsp;&nbsp;If I use javascript the server side asp code is ran anyway.<br><br><br>Any help is greatly appreciated.<br><br>Curtis Delaney
 
use clientside scripting then Javascript should be fine, and using the &quot;navigate&quot; or &quot;location&quot; of the DOM should change your page location. <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>
 
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><font color=red>&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;</font><br><br>I'm not sure what you mean by the asp code being run anyways. Do you mean in the target page?<br> <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