2 Replies Latest reply: Feb 28, 2012 11:58 PM by james. RSS

    Dynamic Action in APEX 3.1.2

    james.
      Hi All,

      I am trying to achieve dynamic action in apex 3.1.2 without refreshing the page. I have 2 pages, In page 1 I am opening page 2 which returns an html text to an hidden value which is working fine up to this part. I am trying to show the return html tag using display item. So I am trying achieve this using following code, but is not working please help me.

      <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>

      <script type = "text/javascript" >
      function refreshdata()
      {  var tmp = new htmldb_Get();
      tmp.add('P123_DISPLAY_HTML'', $v('P123_DISPLAY_HTML''));
      tmp.get();

      $('#DISPLAY_HTML').trigger('apexrefresh');
      }
      </script>

      I have added “DISPLAY_HTML'” as div in of display item like this.

      Pre element text
      <div id="DISPLAY_HTML">
      Post element text
      </div>

      It is displaying text if I manually refresh the page which I want to avoid.

      Anyone’s help is much appreciated.


      Regards
        • 1. Re: Dynamic Action in APEX 3.1.2
          jariola
          Hi,

          Your code just set item P123_DISPLAY_HTML value to session state.
          It do not call any on demand process that could return something.

          Below code do not do anything else than trigger custom event in APEX 3.x. There is nothing out of box that bind to that event.
          $('# DISPLAY_HTML').trigger('apexrefresh');
          Maybe this old Carl's blog post help you to right direction
          http://carlback.blogspot.com/2007/12/apex-ajax-reports-and-you-and-bit-of-31.html

          Regards,
          Jari

          http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
          • 2. Re: Dynamic Action in APEX 3.1.2
            james.
            Thank you Jari, I will look into Carl's blog. If you or anyone as some other direction, please let me know.


            Regards