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     Propagating drilldown values via javascript?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Propagating drilldown values via javascript?
 Login/Join
 
Gold member
posted
I have a simple form where I pass employee number as a parameter to a drilldown report via a text box. The text box and submit button are in a group box up top, generating the report in a frame directly below. The report drills down by subordinate employee numbers.

What I'd like to know is, how to I use script and/or IBI variables to pass the value of the subordinate employee number back to my text box at the top of the screen when that drilldown employee is selected? Currently when I drilldown, the employee number that I originally typed in stays there throughout, which makes rework if I want to resubmit the form with different options (eg. change format to PDF) for the subordinate whose report is now showing in the bottom. I appreciate any help I can get.
 
Posts: 59 | Location: Minneapolis | Registered: September 01, 2004Report This Post
Expert
posted Hide Post
Have you tried making the Style sheet drilldown a JavaScript function? Instead of FOCEXEC=, do JAVASCRIPT=functionName(parameters)

In your JS function, set the text box to the new value, and build the URL to call WebFOCUS.
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
Francis, that worked great, thanks for the tip! In this case, I used the click method to execute the button/report after the new employee number was set. Thanks, Brad
 
Posts: 59 | Location: Minneapolis | Registered: September 01, 2004Report This Post
Platinum Member
posted Hide Post
I have a simple form where a user can select lookup on a list of codes. I run a fex that displays a report in a frame. from there i want to click on a code and update a text box in the calling form with the javascript= drill down. Where does the javascript function go?

Does it have to be in the calling fex? I tried putting it in the launch page.
 
Posts: 103 | Location: ricmmond va | Registered: September 30, 2004Report This Post
Virtuoso
posted Hide Post
The js code has to be in the same frame from where it is being called, the frame that has the JAVASCRIPT= in it.

This js has to then populate the parent.frame where the text box is.

JS can work across frames, providing that the domains of each parent are the same (a basic slant on the rule), but a JS function would not normally be called from one frame to the JS in another.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Platinum Member
posted Hide Post
Thank you Alan . I am still having trouble getting the list box on the parent to populate.

I have tried various methods to get the text box on the parent to populate

function GET_SIC(strSIC_CODE){

alert("The Sic Code passed was " + strSIC_CODE );

//var selobj2 = document.getElementById("SIC_CODE");
//selobj2.setAttribute("value",strSIC_CODE);
document.form.SIC_CODE.value =strSIC_CODE;
parent.iframe1.document.form1.SIC_CODE.value=strSIC_CODE;

}

this is a painter generated form with a frame called Iframe 1.

Does any one have an idea on the correct syntax?
 
Posts: 103 | Location: ricmmond va | Registered: September 30, 2004Report This Post
Virtuoso
posted Hide Post
Without trying this out exactly, the code to get from one frame to another is something like:

document.frames["FRAMENAME"].form1.SIC_CODE.value =

Is Iframe 1 actually the name or id of the frame?


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
You cannot set a select list box by simply equating it to a value.

This is what I do (you may get other suggestions):

I create a function in my general JS library:

// Set a selection box to a matched text value ---------------------------------
function SetSelectBox(SelectObject,TextValue)
{
for (var i = 0; i < SelectObject.length; i++)
  {
  if (SelectObject[i].value == TextValue)
    {
     SelectObject.selectedIndex = i;
     break;
    }
  }
}

Then, to set a select list box to a particular text value, I call the function, passing the Object and the value:

SetSelectBox(document.forms[0].Year,vYear);


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
Thank you all.

I solved the problem by calling a parent window function from the frame function .

parent.window.LOAD_SIC(str).
 
Posts: 103 | Location: ricmmond va | Registered: September 30, 2004Report 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     Propagating drilldown values via javascript?

Copyright © 1996-2020 Information Builders