Alright, hi everyone!
I am attempting to show a success message first and then a second message that displays a message box with YES/NO options.
Here is the javascript code:
In the attached example project, I have a button on a UX that just calls the "showSavedMessage()" function, but in my actual project, I have this being called during server-side Save Submitted Data to Tables -> After save succeeded Javascript section. Both are producing the same results.
Basically, I want the user to see the Submission Successful message first, click OK, then be prompted for with the second box. It seems that the first one never displays, and goes directly to the second box only, prompting for a yes/no.
I have tried calling the second function for the yes/no box from the first one after the OK is clicked but it seems that it still went directly to the second msgbox.
Any ideas?!?!?
Here is a link to a screencast showing how it goes to the yes/no msg box instead of the first one.
http://screencast.com/t/NjqsGDSLnq
and an example project is attached:
thisthenthat_example.zip
Thank you!!
I am attempting to show a success message first and then a second message that displays a message box with YES/NO options.
Here is the javascript code:
Code:
function showSavedMessage() { A5.executeThisThenThat(showSavedMessage2,askClearToScheduleFlag); } function showSavedMessage2() { A5.msgBox.show('Submit Successful','<div style=\'padding: 20px;\'>Record submitted successfully.</div>','o',function() { }); } function askClearToScheduleFlag() { A5.msgBox.show('Appointment Scheduled','<div style=\'padding: 20px;\'>Do you want to clear the SCHEDULE APPOINTMENT flag?</div>','yn',function(button){ if(button == 'yes'){ // code to save... // clearToScheduleFlag //{dialog.object}.runAction('clearToScheduleFlag'); alert('hello'); } else if(button == 'no'){ // code to close without saving... alert('nope'); } }); }
Basically, I want the user to see the Submission Successful message first, click OK, then be prompted for with the second box. It seems that the first one never displays, and goes directly to the second box only, prompting for a yes/no.
I have tried calling the second function for the yes/no box from the first one after the OK is clicked but it seems that it still went directly to the second msgbox.
Any ideas?!?!?
Here is a link to a screencast showing how it goes to the yes/no msg box instead of the first one.
http://screencast.com/t/NjqsGDSLnq
and an example project is attached:
thisthenthat_example.zip
Thank you!!
Comment