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] Radio button Onchange

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Radio button Onchange
 Login/Join
 
Platinum Member
posted
Hi,
I`m trying to use radio button on change function through JavaScript, some how is not working, can any one help me on fixing this
 
//Begin function REPORT_LEVEL_RADIO_onchange

//function REPORT_LEVEL_RADIO_onchange(event) {

function REPORT_LEVEL_RADIO_onchange(ctrl) {

var REPORT_LEVEL_RADIO= document.getElementById("REPORT_LEVEL_RADIO");

var ctrl = REPORT_LEVEL_RADIO.value;

//var ctrl = eventObject.target ? eventObject.target : eventObject.srcElement;

// TODO: Add your event handler code here

 //creating vars for all the groupbox.

 var mid_group_box = document.getElementById("MID_GROUP_BOX"); 

 var client_group_list_box = document.getElementById("CLIENT_GROUP_LIST_BOX"); 

 var sector_list_box= document.getElementById("SECTOR_LIST_BOX"); 

 var entity_group_box = document.getElementById("ENTITY_GROUP_BOX"); 

 var channel_list_box = document.getElementById("CHANNEL_LIST_BOX"); 

 var rdc_list_box = document.getElementById("RDC_LIST_BOX"); 

 

//hiding all groupboxes by default and only showing the ones that are necessary.

 IbComposer_showHtmlElement("MID_GROUP_BOX", true);

 IbComposer_showHtmlElement("CLIENT_GROUP_LIST_BOX", false);

 IbComposer_showHtmlElement("SECTOR_LIST_BOX", false);

 IbComposer_showHtmlElement("ENTITY_GROUP_BOX", false);

 IbComposer_showHtmlElement("CHANNEL_LIST_BOX", false);

 IbComposer_showHtmlElement("RDC_LIST_BOX", false);

// 

 IbComposer_showHtmlElement("CHANNEL_TXT", false); 

 IbComposer_showHtmlElement("SECTOR_TXT", false);

 IbComposer_showHtmlElement("CLIENT_GROUP_TXT", false);

 IbComposer_showHtmlElement("ENTITY_TXT", false);

 IbComposer_showHtmlElement("RDC_TXT", false);

 

 if (ctrl == "MID"){

//Show the appropriate elements

IbComposer_showHtmlElement("MID_GROUP_BOX", true);

//position the elements in the correct place

  MID_GROUP_BOX.style.top = "440px";

  MID_GROUP_BOX.style.left = "60px";

}else if (ctrl == "OPEN_DATE") {

//Show the appropriate elements

 IbComposer_showHtmlElement("MID_GROUP_BOX", false);

 IbComposer_showHtmlElement("CLIENT_GROUP_LIST_BOX", false);

 IbComposer_showHtmlElement("SECTOR_LIST_BOX", false);

 IbComposer_showHtmlElement("ENTITY_GROUP_BOX", false);

 IbComposer_showHtmlElement("CHANNEL_LIST_BOX", false);

 IbComposer_showHtmlElement("RDC_LIST_BOX", false);

 IbComposer_showHtmlElement("CHANNEL_TXT", false); 

 IbComposer_showHtmlElement("SECTOR_TXT", false);

 IbComposer_showHtmlElement("CLIENT_GROUP_TXT", false);

 IbComposer_showHtmlElement("ENTITY_TXT", false);

 IbComposer_showHtmlElement("RDC_TXT", false);

//position the elements in the correct place

} else if (ctrl == "CHANNEL") {

//Show the appropriate elements

 IbComposer_showHtmlElement("MID_GROUP_BOX", false);

 IbComposer_showHtmlElement("CLIENT_GROUP_LIST_BOX", false);

 IbComposer_showHtmlElement("SECTOR_LIST_BOX", false);

 IbComposer_showHtmlElement("ENTITY_GROUP_BOX", false);

 IbComposer_showHtmlElement("CHANNEL_LIST_BOX", true);

 IbComposer_showHtmlElement("RDC_LIST_BOX", false);

 IbComposer_showHtmlElement("CHANNEL_TXT", true); 

 IbComposer_showHtmlElement("SECTOR_TXT", false);

 IbComposer_showHtmlElement("CLIENT_GROUP_TXT", false);

 IbComposer_showHtmlElement("ENTITY_TXT", false);

 IbComposer_showHtmlElement("RDC_TXT", false);

//position the elements in the correct place

  CHANNEL_LIST_BOX.style.top = "440px";

  CHANNEL_LIST_BOX.style.left = "60px";

  CHANNEL_TXT.style.top = "420px";

  CHANNEL_TXT.style.left = "60px";

 

}else if (ctrl == "RDC") {

//Show the appropriate elements

 IbComposer_showHtmlElement("MID_GROUP_BOX", false);

 IbComposer_showHtmlElement("CLIENT_GROUP_LIST_BOX", false);

 IbComposer_showHtmlElement("SECTOR_LIST_BOX", false);

 IbComposer_showHtmlElement("ENTITY_GROUP_BOX", false);

 IbComposer_showHtmlElement("CHANNEL_LIST_BOX", false);

 IbComposer_showHtmlElement("RDC_LIST_BOX", true);

 IbComposer_showHtmlElement("CHANNEL_TXT", false); 

 IbComposer_showHtmlElement("SECTOR_TXT", false);

 IbComposer_showHtmlElement("CLIENT_GROUP_TXT", false);

 IbComposer_showHtmlElement("ENTITY_TXT", false);

 IbComposer_showHtmlElement("RDC_TXT", true);

//position the elements in the correct place

  rdc_list_box.style.top = "440px";

  rdc_list_box.style.left = "60px";

  rdc_txt.style.top = "420px";

  rdc_txt.style.left = "60px";

}else if (ctrl == "SECTOR") {

//Show the appropriate elements

 IbComposer_showHtmlElement("MID_GROUP_BOX", false);

 IbComposer_showHtmlElement("CLIENT_GROUP_LIST_BOX", false);

 IbComposer_showHtmlElement("SECTOR_LIST_BOX", true);

 IbComposer_showHtmlElement("ENTITY_GROUP_BOX", false);

 IbComposer_showHtmlElement("CHANNEL_LIST_BOX", false);

 IbComposer_showHtmlElement("RDC_LIST_BOX", false);

 IbComposer_showHtmlElement("CHANNEL_TXT", false); 

 IbComposer_showHtmlElement("SECTOR_TXT", true);

 IbComposer_showHtmlElement("CLIENT_GROUP_TXT", false);

 IbComposer_showHtmlElement("ENTITY_TXT", false);

 IbComposer_showHtmlElement("RDC_TXT", false);

//position the elements in the correct place

  sector_list_box.style.top = "440px";

  sector_list_box.style.left = "60px";

  sector_txt.style.top = "420px";

  sector_txt.style.left = "60px";

}else if (ctrl == "CLG_NUM") {

//Show the appropriate elements

 IbComposer_showHtmlElement("MID_GROUP_BOX", false);

 IbComposer_showHtmlElement("CLIENT_GROUP_LIST_BOX", true);

 IbComposer_showHtmlElement("SECTOR_LIST_BOX", false);

 IbComposer_showHtmlElement("ENTITY_GROUP_BOX", false);

 IbComposer_showHtmlElement("CHANNEL_LIST_BOX", false);

 IbComposer_showHtmlElement("RDC_LIST_BOX", false);

 IbComposer_showHtmlElement("CHANNEL_TXT", false); 

 IbComposer_showHtmlElement("SECTOR_TXT", false);

 IbComposer_showHtmlElement("CLIENT_GROUP_TXT", true);

 IbComposer_showHtmlElement("ENTITY_TXT", false);

 IbComposer_showHtmlElement("RDC_TXT", false);

//position the elements in the correct place

  client_group_list_box.style.top = "440px";

  client_group_list_box.style.left = "60px";

  client_group_txt.style.top = "420px";

  client_group_txt.style.left = "60px";

}else if (ctrl == "ENT_NUM") {

//Show the appropriate elements

 IbComposer_showHtmlElement("MID_GROUP_BOX", false);

 IbComposer_showHtmlElement("CLIENT_GROUP_LIST_BOX", false );

 IbComposer_showHtmlElement("SECTOR_LIST_BOX", false);

 IbComposer_showHtmlElement("ENTITY_GROUP_BOX", true);

 IbComposer_showHtmlElement("CHANNEL_LIST_BOX", false);

 IbComposer_showHtmlElement("RDC_LIST_BOX", false);

 IbComposer_showHtmlElement("CHANNEL_TXT", false); 

 IbComposer_showHtmlElement("SECTOR_TXT", false);

 IbComposer_showHtmlElement("CLIENT_GROUP_TXT", false);

 IbComposer_showHtmlElement("ENTITY_TXT", true);

 IbComposer_showHtmlElement("RDC_TXT", false);

//position the elements in the correct place

  entity_group_box.style.top = "440px";

  entity_group_box.style.left = "60px";

  entity_group_txt.style.top = "420px";

  entity_group_txt.style.left = "60px";

}

}

 

//End function REPORT_LEVEL_RADIO_onchange

 


Thanks,
Krishna

This message has been edited. Last edited by: FP Mod Chuck,


WebFocus-8/Windows/HTML, PDF, EXCEL
 
Posts: 106 | Registered: September 20, 2010Report This Post
Guru
posted Hide Post
Do you know for sure that the control event firing?

You can check this by commenting all of that out and add

 alert("IT WORKS"); 


within the event.

Run your page and change the radio button option to make sure you get the alert.

This message has been edited. Last edited by: Don Garland,


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Virtuoso
posted Hide Post
Look at the properties of your radio.
Then expand the drop down beside its name and insure that all element (LABEL and INPUT tag) under your radio are named as below to be properly referenced in js :
- Label should be :
   REPORT_LEVEL_RADIO_LABEL_0
   REPORT_LEVEL_RADIO_LABEL_1
   REPORT_LEVEL_RADIO_LABEL_2
   ...
- INPUT Unique Identifier should be :
   REPORT_LEVEL_RADIO0
   REPORT_LEVEL_RADIO1
   REPORT_LEVEL_RADIO2
   ...
- INPUT Name should be as below for ALL input tag:
   REPORT_LEVEL_RADIO

When you create control, the HTML Composer does not name the first occurrence of the radio/checkbox with the name that you gave; you need to rename it.

If you need to rename one, pay attention to properly name the Unique Identifier and the Name of each input element.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Platinum Member
posted Hide Post
Control event is not firing.
May be the Label issue, but I did not find drop down besides it name (I re named as REPORT_LEVEL_RADIO).
Thanks,
Krishna.


WebFocus-8/Windows/HTML, PDF, EXCEL
 
Posts: 106 | Registered: September 20, 2010Report This Post
Expert
posted Hide Post
Why not use the 'out of the box' functionality associated with buttons?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
quote:
but I did not find drop down besides it name


Click on your radio control.
Expend/Open Properties tab
At top of Properties tab you will see :
REPORT_LEVEL_RADIO <DIV>
and a down arrow at far right.
This is the drop down button for that control and this is where you will see all included elements for that control : labels and inputs that are part of a "table" tag.

But if your control event is not firing, it's something else.
Is it properly associated at the properties events tab ?
Is it the proper event that is associated to the control (Click instead of Value Changed) ?


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report 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] Radio button Onchange

Copyright © 1996-2020 Information Builders