This topic is locked

a second 'Save' button

3/16/2020 4:19:13 AM
PHPRunner General questions
S
shoppy author

The tutorial in this topic (https://asprunner.com/forums/topic/2796-button-to-save-and-redirect/) makes just another save button with the same behaviour as the original one.
I want a second save button on the edit page with his own behaviour.

The reasson is that we send an email to the manager why a record is changed.

The second save button must save the record but not the email.
What should be the code for the button?

S
shoppy author 3/16/2020



Check this:

https://xlinesoft.com/phprunner/docs/add_a_new_button_to_add_edit_pages.htm



Thanks Sergey,
But this doesn't work.

It keeps returning to the behaviour of the normal save button.

When I click the new button the normal save button lights up blue.
What am I doing wrong?

Sergey Kornilov admin 3/17/2020

I would that in your new button you need to set some session variable in the Server event first. Then in ClientAfter event trigger click on the main Save button.
Now in events like BeforeAdd or AfterAdd you can check the value of that session variable to see which button was clicked.

A
ayctech 3/19/2020



Check this:

https://xlinesoft.com/phprunner/docs/add_a_new_button_to_add_edit_pages.htm


The most sensible thing would be for the button to have the event of clicking the main button
$("a[id^=resetButton1]").click();