What is the purpose/function of a button?

rss

Posted by MES5464 - Oct 2 ’13 at 04:10

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?

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 10 months 25 days
    #1 by Dmitry Kozlov Oct 3 ’13 at 02:14

    Sure, to prevent an automatic postback, please, put the following code in OnClick property of your button:

    event.preventDefaults();

    To submit the form by clicking your custom button use the following code:

    fd.save().click();
  • MES5464
    Member
    Member for: 6 years 11 months 21 days
    #2 by MES5464 Oct 3 ’13 at 03:04

    thank you

Displaying 1 to 2 of 2 messages