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     javascript in fex [closed]

Read-Only Read-Only Topic
Go
Search
Notify
Tools
javascript in fex [closed]
 Login/Join
 
Gold member
posted
hello all,

I have a problem with javascript in fex.

this is my code.

------------------------
in main.htm :

function testMain()
{
test1();
alert("testMain");
}

function test1()
{
document.form1.IBIF_ex.value = test.fex;
document.form1.IBIMR_fex.value = test.fex;
document.form1.submit();
}

function test2(label,ctrl)
{
alert("test2");
//document.form1.label.text=ctrl
document.getElementById(label).text=ctrl;
}


---------------------

in test.fex

-HTMLFORM BEGIN
<_html><_head><_/head>
<_body onload="test2['label1','testlabel');test2['label2','testlabel');test2['label3','testlabel');"
<_form>
<_/form>
<_/body>
<_/html>
-HTMLFORM END



when i run the html ,alert("testMain") don't displey.

i check the function test2()
i found the alert("test2") display once,but the label1,label2,label3 , three of them all display "testlabel".

i don't konw what's worng with the code....

can anyone help ?

thanks,
Yang

This message has been edited. Last edited by: Yangyang,
 
Posts: 97 | Registered: August 18, 2009Report This Post
Expert
posted Hide Post
Our onload event calls test2 multiple times.

test2 tries to set the text for label tothe value of ctrl, but your form does not have an object named label.

Did you get a javascript error. In i.e. there should be a yellow triangle in the status bar at the bottom left of the window. If you double click on it, it will tell you the error.

did you pist the entire htmlform ?


Make sure that you post your code between the code tags. use the button
</>


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Hi Waz,

thank your help.

the javascript in html is demo.

i'm sorry i didn't write in correct way.

the code is ok , not found error.

: )

in this bbs , when i use : < / > , it's will be transform, so i used <_/> style .

Thanks,
Yang


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
 
Posts: 97 | Registered: August 18, 2009Report This Post
Expert
posted Hide Post
Yangyang,
When Waz specified to use </> , he meant to use the right-most button in the forum Message window - clicking this button will insert
[code]
[/code]
tags - you should always post program code between these tags. Either edit your original posting or repost the HTML and JavaScript code - placed between these code tags.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Watch your parenthesis when calling js functions

Use()
not[)


WebFOCUS 8201M/Windows Platform
 
Posts: 109 | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Thanks all,

this problem i till don't fix it ,

but i want to close this Discussion , how to do it ?

Thanks,
Yang


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
 
Posts: 97 | Registered: August 18, 2009Report This Post
Master
posted Hide Post
Use "Edit or Delete Message" option of initial post. There you can edit the title to add [CLOSED].
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
Platinum Member
posted Hide Post
If I can add one more suggestion priuor yo you closing

remember that the usual way of linking a fex into a HTML file is via a iframe.

This means that referencing a js function that is residing within the parent HTML file must be referenced using the parent keyword

you may also simply relocate the js function to the htmlform tag within your fex

thanks and good luck


WebFOCUS 8201M/Windows Platform
 
Posts: 109 | Registered: October 31, 2006Report 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     javascript in fex [closed]

Copyright © 1996-2020 Information Builders