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 Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/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