ASP & JScript

Results 1 to 2 of 2

Thread: ASP & JScript

  1. #1
    Join Date
    Dec 1969

    Default ASP & JScript

    How can I stop the execution of ASP code while I am in a JScript function? ASP chugs right along while the JS function is executing. I want to display an alert, then response.redirect when the user clicks &#039ok&#039, but the redirect goes ahead so the alert is never seen.<BR><BR>Thanks

  2. #2
    Dan Evans Guest

    Default RE: ASP & JScript

    I think you&#039re getting your server and client side script confused. The ASP doesn&#039t run at the same time as the JScript, it runs while the page is still on the server. The JScript is only ran when it gets to the client so if you&#039re redirecting while the page is at the server the JScript will never get the chance to run.<BR><BR>You should move the redirecting ASP code onto the client. Convert it to normal JavaScript and bung it in after the Alert. If it MUST be run on the server then you will have to send the page back to the server after the Alert has been shown.<BR><BR>Hope this helps,<BR><BR>-Dan Evans

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts