APEX-PLUGIN.COM

..the apex plugin directory

an initiative of

 

Compete in the ODTUG APEX   Plugin Competition!

·   Rules on ODTUG

·   Register to submit

·   Winner will be announced at Kscope12!

 

Basic Competition Rules

  • Only new plugins can enter the competition
  • Plug-ins must be submitted by May14,2012
  • Select ODTUG Competition as category
  • Provide an URL to a demo location
  • Source code uploaded to ODTUG Competition category is not downloadable during competition

Add your APEX4.0 Plugin info

Describe your Plugin’s features. You can upload the Plugin’s code and documentation, or, alternatively, submit the URLs to your website or blog.

You are here:
Follow us on Twitter
Dynamic Action Plugin SkillBuilders Save Before Exit

SkillBuilders Save Before Exit

8
Categories: Dynamic Action Plugin
Author: Dan McGhan

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:

  1. Detects changes made to items on the page
  2. Warning message displayed if user tries to leave page without clicking a button
    • Browser is closed
    • Back button is pressed
    • Link is clicked
    • Other...
  3. Option to customize the warning displayed
  4. Option to select elements that allow a user to leave the page without any warnings
  5. Option to select elements that should not trigger a warning when changed
  6. Methods to control whether or not a user is warned via JavaScript

Keywords
save, change, changes, exit, leave, warn, warning

Warning Message
Warning Message
Company: SkillBuilders
Date added: 16.7.2010
Views: 5203
Votes: 14
Reviews: 28
Min. APEX Version:
4.0
Share on Facebook
Digg! Share on Digg
Save This Page
Link to:
Download
download apex plugin
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.
0 
Review Plugin
by Todd
on March 23, 2012
Thanks Dan for the great plugin! I've got an application that has used this plugin for the last year and it has worked very well!!! Your documentation is top notch too.
Thanks!!!
0 
Lov list
by Dan McGhan
on February 27, 2012
Raoul,

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
8 
Lov list
by raoul mangoensentono
on February 27, 2012
Hi 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
0 
Lov list
by Dan McGhan
on February 26, 2012
Hi 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
0 
Lov list
by raoul mangoensentono
on February 24, 2012
Hi Dan,
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.
10 
Works Great
by David Scher
on November 21, 2011
Just wanted to say this works great and thanks! Installed and configured in about 5 minutes using the included manual. I get a lot of requests for this functionality, which is standard in most document editing applications. Only one question (rhetorical): Why isn't this included with APEX!?

-David
10 
Save Before Exit: Template Button
by Elie
on October 7, 2011
Hi, Dan.

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
0 
by Dan McGhan
on October 5, 2011
Hi 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
0 
Save Before Exit Plugin: Template Button
by Elie
on October 3, 2011
Hi 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
10 
Save Before Exit Plugin: Template Button
by Elie
on October 3, 2011
Hi Dan.

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 RSS Feeds

Disclaimer: The APEX Plugins on this site are not supported by Oracle Support Services.

If you have a question about a Plugin or need support: Login and select the plugin detail page. At the bottom you can enter your Question / Review / Remark.
Your message will be sent to the author of the plugin.