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


Reply via email to