Page 1 of 1

What is the purpose/function of a button?

Posted: 02 Oct 2013
by MES5464
What is the purpose of a button?

It does perform my code but it also seems to perform a post back.

Is it possible to have the button change a text field value, submit, and close the form?

Re: What is the purpose/function of a button?

Posted: 03 Oct 2013
by Dmitry Kozlov
Sure, to prevent an automatic postback, please, put the following code in OnClick property of your button:

Code: Select all

event.preventDefaults();
To submit the form by clicking your custom button use the following code:

Code: Select all

fd.save().click();

Re: What is the purpose/function of a button?

Posted: 03 Oct 2013
by MES5464
thank you