The page will have to be reloaded. CF is a server side language. and thus
can only be run when there is a request made to the server.
Now what you can do is have say a hidden frame, and use JS to reference
back and forth between the two. You push the submit button, it sends the
data to the hidden frame, that page hits the server. When it returns JS
will send the new data back to the front page. But this a lot more trouble
than it is worth.
If I were you I would just reload the page. The only other way that I know
of would be write a Java applet that communicates with the DB server to run
queries directly. This would get messy as well.
At 01:11 AM 4/9/2001 -0400, you wrote:
>Hello all,
>I'm new to this list and to CF in general.
>I'm bulding an application and I want queries to be performed at the
>touch of a button without the page being reloaded. If the page *has* to
>be reloaded then its not the end of the world, just uglier.
>
>I understand how to use CFML to insert dynamic content into a html page.
>How do I cause CF queries take place when a user clicks on a button?
>(This is in contrast to having a submit button that sending the form
>variables to another page that does the processing and then returns a new
>page as a result of that interaction.)
>
>the queries should be transparent, click on button and then the contents
>of a particular feild in the html form is inserted into the database.
>
>There will be multiple buttons on the page, some insert and some select,
>each uses differt feilds in the html page.
>
>The data I want to move around exists in the javaScript scope, is this a
>problem for this application? (the CFML2JS WDDX object looks pretty ugly)
>
>Thanks everyone!
>
>
>
>B. Bogart
>Convergent Media Designer
>--------------------------
>Through scientific absolution we move further and further away from ourselves.
>
>
>Archives: http://www.mail-archive.com/[email protected]/
>Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists