It is currently Thu May 02, 2024 7:16 am
Post by tmnt_2408 » Thu Jun 12, 2014 4:02 pm
How to trigger "save" with onchange function in add or edit page?
Regards, Luki
Post by danielc » Fri Jun 13, 2014 9:44 am
To trigger your action if your "save" is like add/edit button, just add (see api.jquery.com/click/) : #<yourid>.click();
Post by tmnt_2408 » Mon Jun 16, 2014 9:54 pm
Can the 'save' action be triggered by onchange function, means like when you change value in a textbox?
Post by danielc » Tue Jun 17, 2014 9:03 am
There is no "save" button in the generated file. Is it specially created button? Or you mean add/edit?
Yes, you can trigger .click event inside onchange event (I assume you want to click your save button just like add/edit button).
Post by tmnt_2408 » Fri Jun 20, 2014 12:34 am
Dear Daniel,
Yes, save button means add/edit button.
Can you share to me an example of .click event inside onchange event?
Thank you for your kind support.
Post by danielc » Fri Jun 20, 2014 9:18 am
Just add this code to your onchange event: $("#btnAction").click(); // id for add/edit button.
Post by tmnt_2408 » Fri Jun 20, 2014 3:43 pm
It works :)
Thank you very much...
Return to “General Discussion (PHPMaker)”