Solved

cf: calling stored proc from onclick

Posted on 2003-12-03
7
391 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Plug and play, no additional software required!

The ATEN UE3310 USB3.1 Gen1 Extender Cable allows users to extend the distance between the computer and USB devices up to 10 m (33 ft). The UE3310 is a high-quality, cost-effective solution for professional environments such as hospitals, factories and business facilities.

 

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

Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

636 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