You could use js to open a pop up window passing all the values via url, run the query using #url.foo# then close the window.
or (this is how I would do it) you could just handle it as a submit button only check the value of it. if it isn't the "actual" submit button just do the small stuff. if it is the "actual" have it do the full processing.
I do this on several pages, here is an example for you.
both buttons are submit buttons with the name of "submit" one has a value of "submit" the other "run query"
on the page you specified as your forms action page do the following.
<cfif isdefined("form.submit") and form.submit = "run query">
do the little stuff
<cflocation url = "theFormPage.cfm">
</cfif>
<cfif isdefined("form.submit") and form.submit = "submit">
Do all the actual stuff you want this form to do.
</cfif>
Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so.
-Douglas Adams (1952-2001)