This discussion is archived
4 Replies Latest reply: Dec 31, 2012 4:57 AM by 978492 RSS

JQUERY integration within APEX

978492 Newbie
Currently Being Moderated
Hi everybody and merry chrismas...

I have a problem with jquery within apex. I looked for in previous posts but I can not achieve to make it works...
I am running apex 3.2.1 on linux with apex listener.

I want to refresh a report and I found that it was possible to do so using jQuery(...).trigger('apexrefresh'). So I tried to declare jquery...
I downloaded jquery-1.8.3.js from http://jquery.com and uploaded both as static files in shared components with apex.

Now I try to define the file in my javascript section like this :

<script src="#APP_IMAGES#jquery-1.8.3.js" type="text/javascript"></script>
....
<script type="text/javascript">
     // refresh of regions impacted by the change of PXX_ID_OPERATION item
     alert("#APP_IMAGES#jquery-1.8.3.min.js");
     alert(apex.jQuery().jquery);
</script>

But the javscript failed on the apex.jQuery().jquery instruction.
What is my mistake ? I am certainly completely wrong but I did not find a clear tutorial on internet. Thank you in advance for help.

Regards...
  • 1. Re: JQUERY integration within APEX
    fac586 Guru
    Currently Being Moderated
    >

    Please update your forum profile with a real handle instead of "975489".
    I have a problem with jquery within apex. I looked for in previous posts but I can not achieve to make it works...
    I am running apex 3.2.1 on linux with apex listener.

    I want to refresh a report and I found that it was possible to do so using jQuery(...).trigger('apexrefresh').
    Where did you find this?
    So I tried to declare jquery...
    I downloaded jquery-1.8.3.js from http://jquery.com and uploaded both as static files in shared components with apex.

    Now I try to define the file in my javascript section like this :
    <script src="#APP_IMAGES#jquery-1.8.3.js" type="text/javascript"></script>
    ....
    <script type="text/javascript">
         // refresh of regions impacted by the change of PXX_ID_OPERATION item
         alert("#APP_IMAGES#jquery-1.8.3.min.js");
         alert(apex.jQuery().jquery);
    </script>
    Always post code wrapped in tags<tt>\
    ...\
    </tt> tags
    to preserve formatting and prevent it being mangled by the forum software.
    But the javscript failed on the apex.jQuery().jquery instruction.
    What is my mistake ? I am certainly completely wrong but I did not find a clear tutorial on internet. Thank you in advance for help.
    The <tt>apexrefresh</tt> event and <tt>apex</tt> namespaced jQuery are APEX 4.x features that are not available in 3.2&mdash;even if you add jQuery yourself.

    APEX 3.2 support expired in February 2012, so the first recommendation is to upgrade to the latest version (4.2) where reports can be refreshed declaratively using Dynamic Actions.
  • 2. Re: JQUERY integration within APEX
    978492 Newbie
    Currently Being Moderated
    Hi fac 586

    Thank for that answer.
    I will take into account your ramrk about the end of life of apex 3.2, but I can to process such a change right now (the application is in production, and migrating is a new project).
    So I change my question : how can I refresh a report (or region) from javascript with apex 3.2 ?

    regards
  • 3. Re: JQUERY integration within APEX
    TexasApexDeveloper Guru
    Currently Being Moderated
    Since you are NOT in APEX 4.x, maybe one of these will help:
    http://c2anton.blogspot.com/2010/02/apex-refresh-classic-report-region-ajax.html
    this: http://www.oracle-and-apex.com/question-how-to-refresh-an-apex-sql-report-from-javascript/
    http://blog.warp11.nl/2011/04/oracle-apex-report-refresh-the-easy-way/

    Happy Holidays!

    Tony Miller
    Ruckersville, VA
  • 4. Re: JQUERY integration within APEX
    978492 Newbie
    Currently Being Moderated
    Hello

    Thank you. The method with $a_report seems to work.
    However I still have a problem. I open a new thread to explain it.

    Happy new year...

Legend

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