Solved

cf: calling stored proc from onclick

Posted on 2003-12-03
7
379 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:stacey14
Comment Utility
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
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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 …
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now