Focal Point
JavaScript Amper Variable Loading

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7221022802

January 19, 2007, 01:25 AM
kalyanswarna
JavaScript Amper Variable Loading
Hi All,

i have four Dropdowns Begin Month, Begin Year, End Month and End Year.
the Amper Varibles in the FEX are &BEG_MO,&BEG_YR,&END_MO and &END_YR.
i need to create a HTML Page with these 4 dropdowns and to load all these dropdowns from two HOLD files named MONTH and YEAR. give me a javascript functionality to achive this.

i want to call this HTML page by using anothe fex like
*********calling FEX***********************************************
FILEDEF MONTHS DISK /apps/webfocus/adhoc/ibi/gtapps//months.ftm
FILEDEF YEARS DISK /apps/webfocus/adhoc/ibi/gtapps//years.ftm

-HTMLFORM htmlpagename
********************************END********************************

Thanks,


Thanks,
Kalyan.S
------------------------------------
WebFOCUS 7.1.4, Win XP SP2,
Oracle8i.
------------------------------------
January 19, 2007, 06:22 AM
Tony A
Kaylan,

As you are using the HTMLFORM syntax and providing the contents of your ftm files are along the lines of
<option value='something'>Pick something
with or without the surrounding SELECT tag pairing, then you can just include your code at the required place by using !IBI.FIL.MONTHS; where the plink (!) and the semi-colon are required syntax.

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 
January 19, 2007, 09:06 AM
RichH
Hi Kalyan,

At its simplist form,
ILEDEF MONTHS DISK /apps/webfocus/adhoc/ibi/gtapps//months.ftm
FILEDEF YEARS DISK /apps/webfocus/adhoc/ibi/gtapps//years.ftm

-HTMLFORM BEGIN

!IBI.FIL.MONTHS;


!IBI.FIL.YEARS;


-HTMLFORM END

Rich


WebFOCUS 8202 Win 2012
Test - WebFOCUS 8203 on Win 2012
January 22, 2007, 09:58 AM
kalyanswarna
Hi Ineed a dropdowns in my HTML Page, i know the usage of !IBI.FIL.filename

i need a some javacode to achive this by using above function.
i need put three dropdowns on my HTML page and fill these dropdowns by using that ftm files.

thanks


Thanks,
Kalyan.S
------------------------------------
WebFOCUS 7.1.4, Win XP SP2,
Oracle8i.
------------------------------------
January 22, 2007, 10:16 AM
Tony A
Kaylan,

Are you using the HTMLFORM syntax for your HTML page? If not but you are using WebFOCUS to build and run the THML page, then you should use the inbuilt ability for populating combos from Master files or Fex files. See other posts on the subject.

If you are using just straight HTML then you could convert to an ASP file and use the ability to INCLUDE "text" files at the required point.

If you really must use a JS function, then you could call a WebFOCUS process (or similar) and provide a return of an XML file and then parse that XML file to load your combo. But that would be re-inventing the wheel, so to speak, because that is the way IB do it within the ibirls.js file.

You need to be more precise on how you intend to execute this web page, where it will be contained (within WebFOCUS folders?) etc. etc. etc.

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 
January 22, 2007, 11:32 AM
Francis Mariani
Tony, in North America, a plink is a bang! I like plink!


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
January 22, 2007, 02:30 PM
Tony A
Plink sounds softer than a bang, and less harsh (or is that "hash" lol)

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 
January 22, 2007, 04:44 PM
Kerry
Hi Kalyan,

Has this issue been resolved?

One of our internal people reviewed this topic and suggested that you should be using the HTML Layout Painter. By using the HTML Layout Painter, drop downs can be loaded by using dynamic procedures. Those procedures can be pointed to any Master file. Here is the documentation that goes over this:

Developing Reporting Applications With Graphical Tools 7.1, DN: 4500724.0905
Chapter 5: Designing a User Interface for a Web Application With the HTML Layout Painter
Section: Using Forms to Supply Parameter Values
Subsection: Filtering Dynamic Parameter Values
Subsection: Customizing Dynamic Parameters
Page: 5-54 (180)

Hope this helps. Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
January 22, 2007, 11:36 PM
kalyanswarna
Hi Kerry,

here i dont want to use an HTML Layout Paintet because populating the values from datasource si very slow, give me any other option to get this.

Thanks,


Thanks,
Kalyan.S
------------------------------------
WebFOCUS 7.1.4, Win XP SP2,
Oracle8i.
------------------------------------
January 23, 2007, 04:41 AM
Tony A
Kaylan,

We've tried to help, but with no feedback from you we can only throw more suggestions.

What do your ftm files contain? Is it option tags (as I suspect) or is it the full select tag set?

How are you running your HTML page? Via a fex with -HTMLFORM webpage or some other method.

Answer these questions and we may be able to help further.

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 
January 23, 2007, 08:58 AM
kalyanswarna
iam running my HTML page through fex. like

*********calling FEX***********************************************
FILEDEF MONTHS DISK /apps/webfocus/adhoc/ibi/gtapps//months.ftm
FILEDEF YEARS DISK /apps/webfocus/adhoc/ibi/gtapps//years.ftm

-HTMLFORM htmlpagename
********************************END********************************
the FTM file having array as options tag.

Thanks Tony.


Thanks,
Kalyan.S
------------------------------------
WebFOCUS 7.1.4, Win XP SP2,
Oracle8i.
------------------------------------
January 23, 2007, 09:31 AM
Tony A
Kaylan,

You can just use the plink version of file includes or you can use the WEBFOCUS TABLE version -
-* File insftm.fex
FILEDEF MYFTM DISK D:\wfdev\ibi\apps\anthony\insftm.ftm
-RUN

-HTMLFORM insftm

<!-- Html File insftm.htm -->
<html>
<head>
<title>Insert FTM file in Select</title>
</head>
<body>
<span style="position:absolute; top:100; left:10;">Using Plink</span>
<select name=varname style="position:absolute; top:100; left:200;">
!IBI.FIL.MYFTM;
</select>
<span style="position:absolute; top:140; left:10;">Using WebFOCUS Table</span>
<select name=varname style="position:absolute; top:140; left:200;">
<!-- WEBFOCUS TABLE MYFTM -->
</select>
</body>
</html>

and the insftm.ftm file
<option value="first">First
<option value="second">Second
<option value="third">Third
<option value="fourth">Fourth


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 
January 23, 2007, 09:42 AM
kalyanswarna
Thanks Tony i will try this solution.


Thanks,
Kalyan.S
------------------------------------
WebFOCUS 7.1.4, Win XP SP2,
Oracle8i.
------------------------------------