CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 how to call a button outside a form

Print topic Send  topic

Author Message
stephenlau

Posts: 13
Posted: 07/15/2008, 12:32 AM

I have a record grid which has a add button and a cancel button.
I want to make 2 new buttons on the top of the page to call the 2 buttons in the record grid,
so that when I click the button on the top is equal to clicking the button in the record grid.

I have tried to use client OnClick action "SetFocus" to the button, when I click the add button on top, the add button in the record grid is pressed at the same time but it does not trigger the add operation.

Is there any solution or suggestion?
Thank you very much.

Stephen

_________________
.
View profile  Send private message
jjrjr1


Posts: 942
Posted: 07/15/2008, 10:37 AM

Hi

Try Onclick event. Submit Form action
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
stephenlau

Posts: 13
Posted: 07/15/2008, 10:52 AM

Hi jjrjr1,

it works, but I may have a few buttons in the form.
for example I have a add button and cancel button in the record grid.
How can I refer to particular operation with the OnClick submit form?
or any other suggestions?

Thanks a lot

Stephen



_________________
.
View profile  Send private message
jjrjr1


Posts: 942
Posted: 07/16/2008, 11:45 AM

Hi

I spent a little time looking at this but did not have time to completely deiscover how CCS determines which button is pressed. It has to do with the action or button name somehow.

You can try code like this on the on submit form on click event for youe new buttons

document.forms["testdb"].action.value="Delete";
document.forms["testdb"].submit();

This action value did not work but I am sure it is something along these lines.

Let me know is you have any luck



_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message

Add new topic Subscribe to topic   


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

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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