1 Reply Latest reply: Jul 15, 2013 9:24 AM by Ramesh P, Oracle APEX Developer RSS

    need to remove success msg on page refresh

    Chandra Bhanu

      Hi,

      I have a page in which I can edit data and submit it. On clicking submit it is showing process success message as  'UPDATED'.

      Problem is that even I click refresh, the success message appears. I need to remove this success message on page refresh. I used  Clear Cache for all Items on Pages (PageID,PageID,PageID) on page load but its not working.

      Please give some idea.

       

      Thanks,

      Chandru

        • 1. Re: need to remove success msg on page refresh
          Ramesh P, Oracle APEX Developer

          Check URL for action:

           

          https://apex.oracle.com/pls/apex/f?p=60685:16:0::NO

           

           

          Create a page item :P1_MSG_CNTR

           

          Set this item value to 1, :P1_MSG_CNTR := 1 on the same conditions when you display your message

          For example request contained in SAVE, DELETE button actions

          When save or delete buttons are clicked, this page item is set to 1 :P1_MSG_CNTR := 1

           

          Create a dynamic action on page load and also make sure you are firing it on page load time also

           

          Set :P1_MSG_CNTR := 0

           

          On Page header place the following code

           

           

          <script type="text/javascript">

              function clearSuccessMsg(){

                  $("#success-message").remove();

              }

              $(document).ready(function(){

                  var msgCntr = '&P16_MSG_CNTR.';

                  if(msgCntr == 0)

                      clearSuccessMsg();

              });

          </script>