Done.
Thank you.
 
QueenLadyGee

-----Original Message-----
From: Mark E [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 17, 2004 7:10 PM
To: [EMAIL PROTECTED]
Subject: Re: [AspClassicAnyQuestionIsOk] Combine ASP with Javascript


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/
<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   

ADVERTISEMENT
 
<http://us.ard.yahoo.com/SIG=12941bitp/M=298184.5584357.6650215.3001176/D=gr
oups/S=1705006764:HM/EXP=1100823028/A=2434971/R=0/SIG=11eeoolb0/*http://www.
netflix.com/Default?mqso=60185400> click here   
 
<http://us.adserver.yahoo.com/l?M=298184.5584357.6650215.3001176/D=groups/S=
:HM/A=2434971/rand=842432215>   


  _____  

Yahoo! Groups Links


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

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

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




[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