Title: Message
Try removing the ";" after the </CFQUERY>.  I think that this should all be one line of code without the linebreak.  Try it with only one ";" after the last "}" closing the else statement.
 
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Amber Shultz
Sent: Tuesday, December 23, 2003 8:31 AM
To: [EMAIL PROTECTED]
Subject: [KCFusion] CFQUERY and JS

I am absolutely puzzled by this problem I am having when trying to run a cfquery after the user hits the 'OK' confirm button.  The query still runs even if the user hits 'Cancel', but my window.history works fine - and I don't know why! I'm sure it's something completely simple that I am missing - but I sure would appreciate any help anyone has out there!

Thanks!

<SCRIPT LANGUAGE="_javascript_" TYPE="text/_javascript_">
    <!--
   var msg = "Blah blah blah\nClick OK if this correct.\nClick Cancel if not.";
   if (confirm(msg)) {          document.writeln('<CFQUERY name="InsertComment" datasource="ThisDSN">update #session.wateruseTable# set comment = 'Part B Comment: There is a #decimalformat(difference)#% difference in the entry for Part A and Part B Column 1. Part A Total: #PartATot# x1000 Gallons. Part B Total: #PartBTot# x1000 Gallons.' where person_id=#session.person_id# and pin_number=#session.pin_number#</CFQUERY>');
           }
   else { window.history.go(-1); }
                 //-->
</SCRIPT>
-- 
Amber Shultz
GIS Specialist
Data Access & Support Center (DASC)
785.864.2095
http://gisdasc.kgs.ku.edu


This e-mail and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed. If you are NOT the intended recipient or the person responsible for delivering the e-mail to the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited.

Reply via email to