Redirecting a page using java & vb script

Results 1 to 2 of 2

Thread: Redirecting a page using java & vb script

  1. #1
    Join Date
    Dec 1969

    Default Redirecting a page using java & vb script

    Hello again, the alert dialog box appears, except when I enter<BR>the response.redirect command, do you have any idea why that is occuring. It redirects me back to form without prompting the alert message box written in Java script.<BR><BR>oRS.Filter = "RecordID =" & strCN <BR>&#039Add New record if REcordID does not match <BR>&#039*************************************** ** <BR>If oRS.RecordCount &#060;&#062; 0 then <BR>%&#062; <BR>&#060;script language= "JavaScript"&#062; <BR>alert("That order already exists") <BR>&#060;/script&#062; <BR>&#060;% <BR>Response.Redirect("http://laidlaw063/StockNet/snorderdetail.asp?RecordID="& strCN)<BR>elseIF oRS.RecordCount = 0 then<BR>oRS.AddNew<BR>oRS("RecordID")= Request.Form("nrecordid")<BR>Endif

  2. #2
    Join Date
    Dec 1969

    Default fundamental nature of ASP

    ASP is processed on the server. javascript in the browser.<BR><BR>because you&#039re redirecting, the browser never recieves the alert() call, so doesn&#039t alert.<BR><BR>if you want to do this right, try this<BR><BR>&#060;script language= "JavaScript"&#062; <BR>if(alert("That order already exists") ) {<BR> self.location = "http://laidlaw063/StockNet/snorderdetail.asp?RecordID=&#060;%= strCN %&#062;"<BR>}<BR>&#060;/script&#062; <BR><BR>it&#039s a very fundamental point which you&#039re failing to understand here, and by the way, please stick to the original thread<BR><BR>j<BR>

Posting Permissions

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