CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Button OnClick Server Event Custom Query -- Fails

Print topic Send  topic

Author Message
jannaton
Posted: 10/16/2002, 9:12 PM

Hello
Using PHP and Postgres, I can execute custom querys on any other event, be it a page or buttonShow etc...but using exactly the same code on a button OnClick Server Event there is no response.
function Button1_OnClick() { //Button1_OnClick @6-85347D72
//Custom Code @7-2A29BDB7
// -------------------------
$dbconn = new clsDBdons_data();
$dbconn->query("UPDATE appointments SET " .
" memo = 'This is a Button Event';");
// -------------------------
//End Custom Code
} //Close Button1_OnClick @6-FCB6E20C

1) Can buttons have server side onClick events??

2) Am I blind or is this a glitch??
sandman
Posted: 10/17/2002, 2:13 PM

I have a similar prob. I ended up using a record form and then using the approriate button, Assigned a custom Delete or in your case a Update. Then I selected SQL instead of a table and then placed then custom SQL in the properties.

jannaton
Posted: 10/17/2002, 10:46 PM

Thanks.......it worked!!
I was actually trying to replicate an existing aplication.
It merged 2 customers into one, 2 search and 2 grids on one page
with the merge button at the top of the screen.

The merge button I made a record form, as suggested and then added
4 hidden fields (2 customers, fname and lname) that were updated with
some javascript when the customer row was clicked. These hidden fields
then became the parameters in the 3 custom querys that I need to run.

Success...
Nicole
Posted: 10/19/2002, 12:59 AM

Hello,
The server side OnClick event exist for the button located on CCS Record/Search forms only, otherwise it is just isn’t called in the page file code. The workaround is to combine button client side onclick event in order to reload the page (and may be pass any parameters) and page After Initialize event to execute the code you wanted in the sever side button on click event.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.