LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-09-2003, 01:32 AM   #1
Locura
Member
 
Registered: May 2003
Distribution: Ubuntu 6.10 SE, Mac OS 10.4.8
Posts: 370

Rep: Reputation: 30
ColdFusion - Using a script to build and execute SQL query when a button is clicked


I am writing a simple page in ColdFusion with a form to add a record to a database. What I want to do though, rather than creating another .cfm page to build and run the SQL INSERT statement, or having the form call the same page and building and executing it as part of a <cfswitch> statement, is this: I would like to write a script that is exectued when the "Submit" button is clicked, and have the script build and execute the SQL statement. Is this possible? If so, how would I do it and in what language? I am really new to CF and CFScript, and don't know how to do it in JavaScript, if it is even possible.

Edit: I would also like to use this script for form validation, if possible.

Last edited by Locura; 12-09-2003 at 01:39 AM.
 
Old 02-25-2004, 10:59 PM   #2
ElementNine
Member
 
Registered: Sep 2003
Distribution: Red Hat 9 or Gentoo 1.4 whatever I can get to work first
Posts: 105

Rep: Reputation: 15
Im not quite sure what your trying to do. Your are trying to produce sql statements depending on form values? Please elaborate
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to execute code in Implementation class when a button is clicked Gnarg Programming 2 12-01-2005 07:36 AM
found with button was clicked djgerbavore Programming 2 06-29-2005 10:35 AM
Mom clicked a button and "it stopped working" antiocles Linux - Software 3 01-02-2005 02:35 PM
Speeding up the script, or the SQL Query? knickers Programming 1 04-13-2004 12:57 PM
Abiword crashes when print button clicked cougyr Linux - Software 2 11-29-2003 01:15 PM


All times are GMT -5. The time now is 02:02 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration