Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Problem in loading jquery js files in html report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Problem in loading jquery js files in html report
 Login/Join
 
Gold member
posted
Hi All,

I am working on jquery integration with webfocus.

To include jquery js file to html report I have given as below and Jquery is working fine.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js">
<script src="https://datatables.net/release-datatables/media/js/jquery.dataTables.min.js">

As per my requirement i should not use the js files from outside sites. So, I have downloaded the js files from above links and copied to others folder in my application and imported the js files by giving below syntax but jquery is not loading when i give below syntax in my html report.

<script id=item1 src="app/jquery.js">
<script id=item1 src="app/jquery_ui_min.js">
<script id=item1 src="app/jquery_datatables_min.js">

Can anyone tell me, am i missing something?
Is there any particular place to mention the script tags?(I am giving in head tag)
Is there any function to load the javascript in webfocus?

thanks in advance..


Web FOCUS 7.7.03
PDF
 
Posts: 69 | Registered: May 24, 2013Report This Post
Virtuoso
posted Hide Post
Santu, the "src" attribute in the <script> tag must have a value that represents a valid URI.

You are using a value of "app/jquery.js" which is likely not being resolved properly by your web and/or application server. For instance, if you use IIS, do you have an "app" virtual directory declared there?

My suggestion would be to place those files in a location accessible to your webserver; for instance, when the WebFOCUS Client is installed, an "apps" folder is created (i.e. C:\ibi\apps) and an "approot" virtual path is created on the webserver for you. that is true for example if you use IIS and proceeded with a "default" installation.

Anyway, this is something you can try:

1) Create a new folder called "js" instead of the "apps" folder in the server/host where your WebFOCUS Client is installed, and place a copy of your .js files there. for illustration purposes, you'd end up with something that looks like this:

C:\ibi\apps\js\jquery.js
C:\ibi\apps\js\jquery_ui_min.js
C:\ibi\apps\js\jquery_datatables_min.js

You may also go as far as to place your CSS in a similar container as well:

C:\ibi\apps\css\jquery_ui_min.css
C:\ibi\apps\css\jquery_datatables_min.css

2) Verify that you can access those resources. The easiest way is just to open a new browser and use something like this:

http://webfocusclienthostnameh...approot/js/jquery.js

If that works (which I expect will) then you're in business.

3) Manually update your <script> tags in the HTML document to look like this:

<script id="item1" src="/approot/js/jquery.js">
<script id="item2" src="/approot/js/jquery_ui_min.js">
<script id="item3" src="/approot/js/jquery_datatables_min.js">


And that's it!

Another approach would be do it the "MRE" way, which allows you to import css/js resources into the MRE itself via HTML Composer; if you do it that way though, be aware of the fact that the <script> tags may look slightly different as they have to have a custom URI reference that can be resolved into valid MRE resources at runtime (you may see an attribute called rtFileName instead of src, for instance) but that should be okay as HTML composer maintains that automatically for you.

The only caveat to that approach is that your js/css files will end up being copied over to each MRE Domain where you need to use them, so if you plan on upgrading/patching your js/css resources, you'll have to maintain multiple copies of it. Not my preferred approach which is why I suggested something slightly different above.


Hope this helps.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Platinum Member
posted Hide Post
Hi Santu,
I don't if it was intentional - but the filenames of your js files don't match in the two code samples.
Check the spelling & case sensitivitye.g. Upper vs lower-case.


WebFOCUS 8.2.06 mostly Windows Server
 
Posts: 195 | Location: Johannesburg, South Africa | Registered: September 13, 2008Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Problem in loading jquery js files in html report

Copyright © 1996-2020 Information Builders