This topic is locked
[SOLVED]

 Somebody use SweetAlert for Bootstrap

7/31/2020 2:30:29 AM
PHPRunner General questions
Myr0n author

HiI am having problems with the Confirm popup, some users tick on "Prevent this page from creating additional dialogs" and there is where my problem start.

Then I would like to try SweetAlert for Bootstrap but I am null with npn, bower, grunt

Somebody has a guide to install SweetAlert for Bootstrap or help me in the process to resolve my problem with the javascript confirm popup.

Please.

Thank in advance.

HJB 7/31/2020

https://xlinesoft.com/phprunner/docs/about_dialog_api.htm
For inspiration purposes only ..., since PHPR v10.3 the DIALOG API is in existence.
By using same, you can e.g. inform about:
quote excerpt ex https://support.procore.com/faq/i-clicked-prevent-this-page-from-creating-additional-dialogs-how-can-i-undo-this
Answer
Close all app.procore.com tabs in your browser.

Reopen each tab you were working in.

Tip! Use the following keyboard shortcuts to quickly reopen the most recently closed tabs.

On a PC: CTRL + shift + T

On a Mac: Command + shift + T

​​Attempt the action that requires the dialog box. It should now allow you to complete the action.
unquote
Though not being directly answering your SweetAlert related query, a workaround from inside PHPR is available.

Myr0n author 7/31/2020

Check this:

https://www.facebook...58571046161665/


I already tried and looks awesome but the modal thing only works inClient Before fields events but not in Client Before buttons.
In buttons shows the alert and continue to execute Server side and later Client After.



Swal.fire({

title: 'Are you sure?',

text: "You won't be able to revert this!",

icon: 'warning',

showCancelButton: true,

confirmButtonColor: '#3085d6',

cancelButtonColor: '#d33',

confirmButtonText: 'Yes, delete it!'

}).then((result) => {

if (result.value) {

pageObj.getItemButton('ButtonPostalCodeStateSave_Event').click();

}else{

Done.setValue(0);

PhoneNumberToSearch.setFocus(true);

}

})

btw: When I click on check syntax button it give an error "Microsoft JScript compilation error: Syntax error in line 13" and in run time

Myr0n author 7/31/2020

Thank you so much to everybody

What did I do to solve my problem with the javascript confirm popup " "Prevent this page from creating additional dialogs" "?

1.-I create a copy of my button that was suppose to click the user I gonna call that button "Button_Save_Data"

2.-I hided the button "Button_Save_Data"3.-I create an extra button and I placed just aside the button "Button_Save_Data" and I called it "Button_Save_Data_Click"4.-I cleared out the Client Before, Server from "Button_Save_Data_Click"5.-I moved all the code of Client Before from "Button_Save_Data" to Client After of "Button_Save_Data_Click" similar code from post #3

6.-I added a condition in the Client After "Button_Save_Data_Click", if users answer Yes to the Sweet Alert then execute the click event of "Button_Save_Data" if not do nothing.7.-I copied the label from "Button_Save_Data" to "Button_Save_Data_Click"8.-I Documented what did I do to solve my problem with the javascript confirm.

And everybody is happy now