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     [CLOSED]Need Help in JRunning animation and Java script

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Need Help in JRunning animation and Java script
 Login/Join
 
Gold member
posted
Hello,
I need help in creating HTML. I one HTML, I have have loaded three Panel, say Panel, Panel2 and Panel3. Each Panel consists of a Run button with task. I also created a Drop down consisting of three display value like US Total, Branch, UnderwritingCenter. Initially I hide all panel. Now I want to click UStotal and it should show Panel1, If I click branches it should show panel2 and If I click Underwritingcenter, it should show panel3. My idea is to create 3 animation like Animationreport1,animationreport2 and animationreport3. Then I want to create function in java script and run the java script.
function check_report(){
var current_report = IbComposer_getCurrentSelection('reportlist');
if(current_report == 'USTotals'){(IbComposer_runAnimation('Animation1');


}
This is the code of my java script for first animation. But In am getting error.Please help.
Regards,
Niha

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS 8
Windows 7
HTML
 
Posts: 50 | Registered: August 18, 2015Report This Post
Virtuoso
posted Hide Post
What version of WebFOCUS?


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Expert
posted Hide Post
Whats the error ?


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
Master
posted Hide Post
That code does not look valid. You seem to have an extra parenthesis in there. Try:

var current_report = IbComposer_getCurrentSelection('reportlist');
if(current_report == 'USTotals') {
  IbComposer_runAnimation('Animation1');
}


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Gold member
posted Hide Post
Hello,
Thanks. By your advice I wrote the following codes. I want to Run three animation. If I click UStotal, it should show PanelUp.. If I click producing Branch and Territory, it should show Panel2UP and if I click Underwritingcenter and Branch it should show panel3Up.

var current_report = IbComposer_getCurrentSelection('reportlist');
if(current_report == 'USTotals') {
IbComposer_runAnimation('panelUp');
}


var current_report = IbComposer_getCurrentSelection('reportlist');
if(current_report == 'Producing Branch and Territory') {
IbComposer_runAnimation('panel2Up');
}



var current_report = IbComposer_getCurrentSelection('reportlist');
if(current_report == 'Underwriting Center and Branch') {
IbComposer_runAnimation('panel3Up');
}



I am not sure if I will add a function or not. Please advice.
Niha


WebFOCUS 8
Windows 7
HTML
 
Posts: 50 | Registered: August 18, 2015Report This Post
Gold member
posted Hide Post
quote:
Originally posted by BabakNYC:
What version of WebFOCUS?


Hello,
It is web FOCUS 8104.
nIHA


WebFOCUS 8
Windows 7
HTML
 
Posts: 50 | Registered: August 18, 2015Report This Post
Master
posted Hide Post
Assuming "combobox1" is your drop down identifier, you could do this:

//Begin function combobox1_ononafterload
function combobox1_ononafterload(ctrl) {
  hide_panels();
  var selection = document.getElementById("combobox1").value;
  show_panel(selection);
}
//End function combobox1_ononafterload

//Begin function combobox1_onchange
function combobox1_onchange(event) {
  hide_panels();
  var selection = document.getElementById("combobox1").value;
  show_panel(selection);
}
//End function combobox1_onchange

function show_panel(selection) {
  switch(selection) {
    case "US Total":
      hide_panels();
      document.getElementById("panel1").style.visibility = "visible";
      IbComposer_runAnimation('Animation1');
      break;
    case "Branch":
      hide_panels();
      document.getElementById("panel2").style.visibility = "visible";
      IbComposer_runAnimation('Animation2');
      break;
    case "UnderwritingCenter":
      hide_panels();
      document.getElementById("panel3").style.visibility = "visible";
      IbComposer_runAnimation('Animation3');
      break;
  }
}

function hide_panels() {
  var p1 = document.getElementById("panel1");
  var p2 = document.getElementById("panel2");
  var p3 = document.getElementById("panel3");

  p1.style.visibility = "hidden";
  p2.style.visibility = "hidden";
  p3.style.visibility = "hidden";
}


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Guru
posted Hide Post
Hope, you don't overlooked the control names. BTW, what's the error?


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Gold member
posted Hide Post
quote:
Originally posted by Squatch:
Assuming "combobox1" is your drop down identifier, you could do this:

//Begin function combobox1_ononafterload
function combobox1_ononafterload(ctrl) {
  hide_panels();
  var selection = document.getElementById("combobox1").value;
  show_panel(selection);
}
//End function combobox1_ononafterload

//Begin function combobox1_onchange
function combobox1_onchange(event) {
  hide_panels();
  var selection = document.getElementById("combobox1").value;
  show_panel(selection);
}
//End function combobox1_onchange

function show_panel(selection) {
  switch(selection) {
    case "US Total":
      hide_panels();
      document.getElementById("panel1").style.visibility = "visible";
      IbComposer_runAnimation('Animation1');
      break;
    case "Branch":
      hide_panels();
      document.getElementById("panel2").style.visibility = "visible";
      IbComposer_runAnimation('Animation2');
      break;
    case "UnderwritingCenter":
      hide_panels();
      document.getElementById("panel3").style.visibility = "visible";
      IbComposer_runAnimation('Animation3');
      break;
  }
}

function hide_panels() {
  var p1 = document.getElementById("panel1");
  var p2 = document.getElementById("panel2");
  var p3 = document.getElementById("panel3");

  p1.style.visibility = "hidden";
  p2.style.visibility = "hidden";
  p3.style.visibility = "hidden";
}


WebFOCUS 8
Windows 7
HTML
 
Posts: 50 | Registered: August 18, 2015Report This Post
Gold member
posted Hide Post
Thanks . will work on it and let you know.
Regards,
Niha


WebFOCUS 8
Windows 7
HTML
 
Posts: 50 | Registered: August 18, 2015Report 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     [CLOSED]Need Help in JRunning animation and Java script

Copyright © 1996-2020 Information Builders