Solved

cf: calling stored proc from onclick

Posted on 2003-12-03
7
384 Views
Last Modified: 2013-12-24
can someone show me the Cold Fusion syntax for calling a stored procedure using the onclick event of a checkbox...I need a field in a table to be updated everytime this checkbox is clicked.
0
Comment
Question by:stacey14
7 Comments
 
LVL 11

Accepted Solution

by:
hart earned 100 total points
ID: 9866698
u cannot call a procedure onclick !

u'll need to submit ur checkbox values to a page - which inturn will call ur procedure & do the necessary updates.

hope that helps

B'Rgds
Hart
0
 

Author Comment

by:stacey14
ID: 9866819
ok..thats fine...would you create a javascript function (that calls another page to process the sp) and call it from the onclick of the checkbox, or could I create a CFscript function to do this?
0
 
LVL 6

Expert Comment

by:PE_CF_DEV
ID: 9867682
You will have to make a javascript function to call a new page.

ColdFusion:
Server side -executed before the client ever sees anything.

Javascript:
Client side - executed by the visitors machine the only way it can interact with the the server is with new page requests


with javascript you're best bet is to eathier reload the page or popup a new window and the close it right after opening. If you choose the later of the 2 it will not work all the time due to popup blockers. If you need help with the Jscript let us know. (I would post it but its time to do work hehe)
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:stacey14
ID: 9869254
I would prefer to reload the same page instead of loading a new page...I want it to look like they never left the page they are viewing... thanks...yes javascript code would help emmensely
0
 
LVL 9

Expert Comment

by:shooksm
ID: 9870688
Here are a couple sites detailing how to use an IFRAME to perform the remote procedure call without reloading the original page.  IFRAMES are only supported on IE4+ and NS6+ but it gets past the issue with a seperate window getting blocked by a popup blocker:

http://dynarch.com/mishoo/rpc.epl
http://developer.apple.com/internet/javascript/iframe.html
0
 
LVL 9

Expert Comment

by:shooksm
ID: 10981545
I object.  My solution with the Remote Procedure Call fits the askers requirements of "I want it to look like they never left the page they are viewing".  This is a common way to pass data between a page and a remote server without reloading the entire page.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question