This discussion is archived
1 2 Previous Next 23 Replies Latest reply: Feb 15, 2012 11:53 PM by fac586 Go to original post RSS
  • 15. Re: Save Warning process
    dmcghan Oracle ACE
    Currently Being Moderated
    Varad,

    Sorry, I meant IE7. It's not doing that to me...

    Regards,
    Dan

    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
  • 16. Re: Save Warning process
    438381 Guru
    Currently Being Moderated
    Dan, try this test

    1) Navigate to Bob's page
    2) Click an EMP to edit
    3) Change the value for Ename
    4) Click the Date-Picker - This causes the 'onBeforUnload' event to fire

    I am using IE version 7.0.5730.13.
    It works fine in FF 3.0.5


    varad
  • 17. Re: Save Warning process
    dmcghan Oracle ACE
    Currently Being Moderated
    Varad,

    Bingo! That did it... Thanks ;)

    Regards,
    Dan

    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
  • 18. Re: Save Warning process
    dmcghan Oracle ACE
    Currently Being Moderated
    Bob,

    This took entirely too long and to be honest, I'm not done ;) Here's the half done test site. I really liked learning a little bit about this and I think I need to keep working on it to get things right for the various item types in jQuery. To give credit where it's due, I started with the following:
    http://jonstjohn.com/node/23

    And ended up with this...
    <script type="text/javascript">
    //<![CDATA[
    
       $(document).ready(function(){
          var $items = $(':input[id^="P&APP_PAGE_ID._"]');
          
          $items.change(function() {
             window.onbeforeunload = unloadMessage;
          });
          
          $('a').click(function(event){
             if ($(this).children('img[id="P&APP_PAGE_ID._DATE_PICKER_IMG"]').length > 0) {
                event.preventDefault();
                eval($(this).attr('href'));
             }
          });
       });
    
       function unloadMessage() {
          return 'You have made changes to data on this page.  If you navigate away from this page without first saving your data, the changes will be lost.';
       }
    
    //]]>
    </script>
    I'll probably blog about this when I get it a little better.

    Regards,
    Dan

    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen

    Edited by: dmcghan on Dec 24, 2008 12:42 AM
  • 19. Re: Save Warning process
    180271 Newbie
    Currently Being Moderated
    Thanks for looking at it. I never thought to try this in Firefox, but as you noted it does not happen (I hate IE!). Also received a message from my Oracle contact that jQuery will be included in APEX 4.0.
  • 20. Re: Save Warning process
    dmcghan Oracle ACE
    Currently Being Moderated
    Bob,

    You're very welcome. If this question is now answered please mark it as such. Also, if you found an answer to helpful/correct please mark it as such too.

    You really should be doing all of your development in FireFox and then just testing in IE. Don't wait for jQuery to be included, get started sooner rather than later...
    http://www.danielmcghan.us/2008/06/jquery-in-application-express.html

    Regards,
    Dan

    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
  • 21. Re: Save Warning process
    dmcghan Oracle ACE
    Currently Being Moderated
    Bob,

    I blogged a little bit on this and came up with some better code...
    http://www.danielmcghan.us/2008/12/wait-wait-don-forget-to-save.html

    Regards,
    Dan

    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
  • 22. Re: Save Warning process
    917859 Newbie
    Currently Being Moderated
    Thanks for the post. I have changes some fields values and clicked calendar, cancel button but no alert is population.
  • 23. Re: Save Warning process
    fac586 Guru
    Currently Being Moderated
    914856 wrote:
    Thanks for the post. I have changes some fields values and clicked calendar, cancel button but no alert is population.
    You are totally wasting your time. There is no point in posting follow-ups to threads this old in the expectation that the original participants will respond&mdash;watches on threads that will generate email notifications of thread updates last for only a period of a few weeks.

    "177268" is not listening. Gone. An ex-poster. Look at their profile: not posted in 2 years.

    Posting follow-ups to ancient threads/departed users is NOT an effective way of getting help:

    <li>Other users may ignore the thread if it is closed.
    <li>Your assumption that the questions are related may be incorrect, leading to confusion about the nature of the problem and potential solutions.
    <li>Watches on the thread will have expired, so the original participants are totally unaware of the new post. They may no longer be active on the forum.
    <li>You have no ability to mark posts as helpful or correct.

    Post your question as a new thread, including at least the following information:

    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s)
    <li>Links to related posts and threads (using the methods in the FAQ)

    Please read the FAQ and forum sticky threads for more information on using this forum effectively.

    Update your forum with a real handle instead of "914856".
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points