Javascript in asp

Results 1 to 4 of 4

Thread: Javascript in asp

  1. #1
    LittlePaul Guest

    Default Javascript in asp

    inform();<BR><BR>&#060;%<BR>Response.Redirect "main.asp"<BR>%&#062;<BR><BR>&#060;/BODY&#062;<BR>&#060;SCRIPT LANGUAGE="JavaScript"&#062;<BR>function inform() {<BR> alert("You have been successfully logged out");<BR>}<BR>&#060;/SCRIPT&#062;<BR>&#060;/HTML&#062;<BR>____________________________________ ______________________<BR>Hello everyone,<BR><BR>He code above should call a page, blow up a javascript alert box, then call another page. The asp redirect is processed first so the alert never appears. How do i do this?<BR><BR>cheers, lp<BR>

  2. #2
    Culture Guest

    Default RE: Javascript in asp

    The asp code does all the processing in the page at load up.<BR>Which means any embeded code runs as soon as the page opens.<BR><BR>i suggest you take out the response.redirect and add into the javascript (below the alert)<BR>window.location.herf="main.asp";

  3. #3
    LittlePaul Guest

    Default Thanks

    great, thanks :)

  4. #4
    Culture Guest

    Default RE: Thanks

    ooooo as long as you put window.location.HREF......<BR><BR>as i can&#039;t spell ;)

Posting Permissions

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