Solved

cf: calling stored proc from onclick

Posted on 2003-12-03
7
386 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
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

749 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