SkillBuilders Save Before Exit Tweet |
|
|
Categories:
Dynamic Action Plugin
Wait, wait! Don't forget to save...Have you ever filled out a form and accidently left the page without saving your work? It is actually quite easy to do. Thankfully, browsers have features to help prevent this from happening. The problem, however, is that taking advantage of those features can be quite difficult - until now. The SkillBuilders Save Before Exit plug-in allows you to notify your users if they leave a page without saving their work. Simply install the plug-in and add it to your page! Features at a glance:
Keywords
save, change, changes, exit, leave, warn, warning |
Company:
SkillBuilders
Date added: 16.7.2010
Views:
5203
Votes:
14
Reviews:
28
Min. APEX Version:
4.0
Link to:
If something is not correct please report it here:
Report Listing
|
|
Do you have a question about this Plugin? Want to write a Review or Comment?
Login first. Reviews / Questions / Comments are e-mailed to the author of the Plug-in. |
Thanks!!!
The short answer to your question is no, it's too late. However, using JavaScript and the API provided with the plug-in or by using Ajax rather than a full page refresh, you should be able to do what you are looking for.
If you would like further help on this please set up an example on apex.oracle.com that accurately reproduces the issue. Provide me with developer credentials so that I can take a look. You can send the credentials to the email address supplied in the documentation of the plug-in.
Regards,
Dan
The lov list is suppose to refresh the page so my form gets refreshed to fill new data. Its just that now if I filled my form and then chose something new from the list, the page gets refreshed without a warning that I haven't saved the form yet. So I used your plugin which helps alot. But now if I make a new choice, the warning appears. And if I want to stay on the page the lov list doesnt go back to its original state, its still in the new choice.
Tnx,
Raoul
The first thing I would do is try to eliminate the full page refresh. There are many declarative Ajax options now built into APEX that would both solve your issue here as well as provide a better experience for your end users.
If that wasn't possible for some reason then you just need to change things around a little bit so that submit the page manually. Doing this will allow you to manually disable the alert before submitting the page.
The following JavaScript will disable the warning:
$(document).apex_save_before_exit('disableWarning');
If you add the following JavaScript to the Execute when page loads attribute of your page it should both disable the warning and submit the page (just update the item name):
$('PX_ITEM_NAME').change(function(){
$(document).apex_save_before_exit('disableWarning');
apex.submit();
});
Just don't forget to turn off the submit from within the item.
Regards,
Dan
If you need help
First of all I wanted to say, Wow this plugin is GREAT!
I am using this plugin in a page that gets reloaded when a choice is made in a lov list. If I change the choice in the lov list the popup comes. When I chose stay on page the choice in the lov list stays on the new choice. How make it the old choice?
Tnx.
-David
Thank you so much for your help. I saw what you did on my form page (in my apex.oracle.com workspace/app). After changing my "Save" button from an HTML to a template based button, you replaced the css class I had created with the css class that is embedded within the template used by the button. And now the template based button works with your plugin as expected.
And you what? It all makes perfect sense. Of course, I needed to use the css class that is in the template since that class is overriding my own created class name.
Thanks for fixing this and for teaching along the way. It's much appreciated.
Elie
I changed your selector to use :button, which worked fine for the save button. Your template already uses a class so using button attributes to add another class would be invalid markup. I suspect that was the cause of the issue.
Dan
I just looked at what my previous message looks like and, to my horror, the template code is missing. It must be because of the html I'm using. And so, I'm trying to re-send it using "pre" tags surrounding my code. I hope this works.
Thank you.
Elie
================================
Sorry for the long delay between responses.
Thank you for your tip about adding "#apex-dev-toolbar a,#htmldbDevToolbar a" (without the quotes) to the "Disable Warning Selector" field in your plugin.
That worked. Now, when working in developer mode, after I change fields on my form and then click any of the developer toolbar links, I no longer get the "Warning" popup.
Thank you very much.
Unfortunately, though, I still am unable to use template based buttons with your plugin (version 2.3.0).
Per your suggestion, I copied the Apex "Button" template and named the copy "Elie Button". I then changed the button template code so that it includes #BUTTON_ATTRIBUTES#. Here's what my new template code looks like:
As a test of this, I then changed the "Apply Changes" button on my form (page 140 in my sample application on apex.oracle.com -- information below) so that it is now a template-based button. I also made this button use my new "Elie Button" template.
I still get the warning popup whenever I change a form field and subsequently click the "Apply Changes" button.
If you have the time, I would much apprceiate you looking at my Apex app 47872 ("Elie_Goodies") hosted on apex.oracle.com.
Workspace = EEG
Username = egrunhaus@gmail.com
Password = galaxy (all lowercase)
If you run this app (there is only DAD authentication enabled), please click the tab "Detect Form Change". This shows you page 110. Here, please click the report on the far right called "[Plugin] Detect Form Change: Emp Report". This takes you to my page 140 on which I've made all of the above button changes.
Any help on this would be much appreciated.
Thank you very much.
Elie
Sorry for the long delay between responses.
Thank you for your tip about adding "#apex-dev-toolbar a,#htmldbDevToolbar a" (without the quotes) to the "Disable Warning Selector" field in your plugin.
That worked. Now, when working in developer mode, after I change fields on my form and then click any of the developer toolbar links, I no longer get the "Warning" popup.
Thank you very much.
Unfortunately, though, I still am unable to use template based buttons with your plugin (version 2.3.0).
Per your suggestion, I copied the Apex "Button" template and named the copy "Elie Button". I then changed the button template code so that it includes 3BUTTON_ATTRIBUTES#. hERE'S WHAT MY NEW TEMPLATE CODE LOOKS LIKE:
As a test of this, I then changed the "Apply Changes" button on my form (page 140 in my sample application on apex.oracle.com -- information below) so that it is now a template-based button. I also made this button use my new "Elie Button" template.
I still get the warning popup whenever I change a form field and subsequently click the "Apply Changes" button.
If you have the time, I would much apprceiate you looking at my Apex app 47872 ("Elie_Goodies") hosted on apex.oracle.com.
Workspace = EEG
Username = egrunhaus@gmail.com
Password = galaxy (all lowercase)
If you run this app (there is only DAD authentication enabled), please click the tab "Detect Form Change". This shows you page 110. Here, please click the report on the far right called "[Plugin] Detect Form Change: Emp Report". This takes you to my page 140 on which I've made all of the above button changes.
Any help on this would be much appreciated.
Thank you very much.
Elie
| Powered by Sigsiu.NET | ![]() |


SkillBuilders Save Before Exit
Save This Page
