ColdFusion runs on the server, Javascript & HTML on the client (web browser).  In this 
case, the query runs on the server when the page is requested.  The data is then sent 
back to the client.  The browser runs through the javascript form and processes it.  
Because of this, the query has already run before the results are even sent to the 
browser.

The only easy way to prevent the query from running is to have the javascript submit a 
page/form to the server to trigger the query to run.  I don't think there is an easy 
way around this 2 stage process.  If you only want the query to run when the user 
clicks and confirms a button in the browser, have the javascript call a separate page 
(or the same page with a special url/form variable) after the confirmation has been 
made.













 
=========================================================
Kansas City ColdFusion User Group's website & listserv is 
hosted through the generous support of Clickdoug.com
To send email to the list, email  [EMAIL PROTECTED]
To subscribe or unsubscribe, send an email to [EMAIL PROTECTED] with your request.
For hosting solutions http://www.clickdoug.com
Featuring Win2003 Enterprise, RedHat Linux, CFMX 6.1. 
======================================================

Reply via email to