How to use JS file with APEX?


Today we can not think an application without Ajax/js. Good news APEX already included external js/css facility. First time i have faced some problem implemented external js in APEX but finally implemented. Now step by step we will show the process…

1. Open your application and click ‘Shared components’.

Application Home

 

2. At the bottom of the page ‘Files’ block, click ‘Static files’

3. Click ‘Create’ button from top right corner. Browse your js file i.e.jquery.js

4. Now go your page where you want to implement this js file. Click ‘Edit page #’ & edit page properties. GO to ‘HTML Header and Body Attribute’ and put like bellow line..

<script src=”#APP_IMAGES#jquery.js” type=”text/javascript”>

 

5. Now call your js functions & enJoy!

Best of luck , if further any query please buzz me.

 

About these ads

6 thoughts on “How to use JS file with APEX?

  1. can you help me,please??

    I create this test case .js file:

    — ScriptJava.js file ——-

    function NoNavButton(){
    window.history.forward(1);
    }

    and i saved it into apex static file, as shown by you.

    Then i put this code into ‘HTML Header and Body Attribute’ of the my page:

    but…
    nothing happened!!! :(

    and i don’t know what i have to done!

  2. In Apex 4: I uploaded my js file as shown there, then went to the page where I want to use the funcion, in section JavaScript, in File URLs add the code

    #APP_IMAGES#my_script.js

    My script has only 1 function and I used it first as part of page javascript code, then deleted it and loaded as a js, and now, it’s working.

    Thanks

  3. Hey,
    I just wanted to know how can we use jquery themes in APEX by specifying link attribute in html header.I tried doing this but no results,can u help me on this.You can mail me to ashwin.rao@estuate.com,awaiting reply

    Thank You

  4. i want to edit an existing file page92.js which works only for page2.I added code to work for page81

    window.opener.document.getElementById(‘P2_RTP_NBR’).value = threatNbr.value;
    window.opener.document.getElementById(‘P81_THREAT_PRI_NUM’).value = threatNbr.value; —–added
    when i saved and uploaded 2 page92.js files.
    Hence i changed name to page92test.js

    In page 92 replaced page92,js to page92test.js not working.Please help

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s