Focal Point
Location for Javascript files
May 19, 2008, 03:08 PM
shravanLocation for Javascript files
Hi,
Can somebody please tell me, where do I need to place my javascript(parameter validation) files, so that my html pages can access ?
Thank you.
Shravan
7.7.03, Windows 7, SQL Server 2005
May 19, 2008, 04:11 PM
Darin LeeIf they're just javascript, they would be either included in the html pages themselves or loaded via reference in the html pages. As for location, it doesn't matter much as long as they are either in a location known to your web server or referenced explicitly within your launch pages. I'm not a javascript guru, but never really had a problem with this. Maybe you can give a little more description/example of what you are trying to do.
Regards,
Darin
In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
May 19, 2008, 04:27 PM
shravanDarin,
They are just javascript files. But, I have a lot of validation in them. And most of the html files contain same javascript code.I don't want all of my html (parameter) files to contain same javascript (and a lots of it). So, I am trying to reference the javascript files which contain this script. I put my javascript file at the same place as where my html files are. The html files don't seem to recognise the javascript file.
I am not a lot experienced with WebFOCUS. So, I was wondering if there is a different way of doing it or there is some specific location for javascript files, so that my html pages can access them.
7.7.03, Windows 7, SQL Server 2005
May 19, 2008, 04:31 PM
KameshSave it under
drive\ibi\Webfocus71\ibi_html\javaassist
In your fex, add this SET JSURL=/ibi_html/yourfilename.js
Hope this helps,
WFConsultant
WF 8105M on Win7/Tomcat
May 19, 2008, 04:34 PM
shravanKamesh,
I am not using / referencing javascript from a fex. I am referencing it from an html file. That javascript file contains just the validation of parameter fields.
7.7.03, Windows 7, SQL Server 2005
May 20, 2008, 02:10 AM
Tony AShravan,
... anywhere your HTML file can access it - think URL.
T
In FOCUS since 1986 | WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2 | | |
WebFOCUS App Studio 8.2.06 standalone on Windows 10 | |
May 20, 2008, 09:44 AM
GinnyJakesKamesh,
It is not good practice to put user-developed code in the IBI provided directory paths. When you upgrade, you will have to move everything.
The best practice is to put it in a directory under ibi/apps. Your relative reference would then be /approot.
Shravan, I would recommend the same thing especially if your html file is also under /approot.
Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
May 20, 2008, 01:59 PM
shravanGinny,
Both HTML and Javascript files are in the same folder under ibi/apps.
And then in my HTML I am refering to Javascript file as...
<SCRIPT id=clientEventHandlersJS type=text/javascript src = "Validations.js">
And yet, my HTML file is not able to access the Javascript file. Am I doing anything wrong ?
7.7.03, Windows 7, SQL Server 2005
May 20, 2008, 02:06 PM
Francis Mariani
<script type="text/javascript" src="/approot/app-name/file-name.js"></script>
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
May 20, 2008, 03:56 PM
shravanThanks everybody. Thanks Francis.
7.7.03, Windows 7, SQL Server 2005
May 20, 2008, 04:07 PM
KameshThanks Ginny, That makes sense.
WFConsultant
WF 8105M on Win7/Tomcat
January 09, 2015, 10:26 AM
gregvI'm going to reopen this topic since I have the same issue but with a newer version , 8.0.07.
I inserted a JS file in HTML Composer and everything works fine from Dev Studio.
Everything is working from App folders.
Dev Studio/HTML Composer insists on copying a central, reusable version of this JS file into my working directory so that I now have multiple copies which I don't want.
When I look at the text, I see that the reference is for a local file and it is not found when I run from the BIP.
<script id=ITEM4 type=text/javascript rtFileName="date_valid_check.js">
Does anyone know of a way to insert this js file into the HTML Composer so that I can use 1 files for many HTML pages (different apps) and from the portal?
Thanks.
Greg
current client: WF 8.1.05 & 8.2 - Windows 7 64bit - Tomcat 7 - MRE / BID - IE11
local: WF 8.2 - Windows 7 64bit - Tomcat 6 - MRE / BID - FOCUS - IE11
PMF 8