Nothing jumps out at me.  However, I can offer an alternative solution.
 
Instead of relying on javascript for the confirmation, simply redirect the user 
to a new page when they have a duplicate record and display a confirm message 
to the user.  If they choose to continue, have a submit button that submits the 
psge and stores the record.  
 
Mark

queenladygee <[EMAIL PROTECTED]> wrote:


This maybe a combination ASP and Javascript problem, I'm not 
certain.  I have an asp page with the following code snippet. 
I am inserting/updating records. 
May code snippet: 
If objRS.EOF Then 
Insert Record (works) 
Else 
**Now this is the problem portion 
  msg="Division ID "+objRS("DivID")+ " already exists for "+objRS
("DivName") & "." 
  Response.Write "<" & "script language=javascript>" 
  Response.Write "var msg = '"+msg+"';" 
  Response.Write "var x=confirm(msg + '\nAre you sure you want to 
  replace it?');" 
      Response.Write "if(x==false)" 
      Response.Write "{" 
      Response.Write "window.history.go(-1);"   
      Response.Write "}" 
      Response.Write "<" & "/script>"       
End If

Update record. 

When the user clicks on "Cancel" the app needs to go back to the 
previous page (which it does), but I need to the record not to be 
updated (which it is doing)!   

Thus, regardless of the user clicking "Ok" or "Cancel" the record is 
updated.   









Yahoo! Groups SponsorADVERTISEMENT


---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
  
   To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
  
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to