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] App Studio 8201 Javascript for checkbox

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] App Studio 8201 Javascript for checkbox
 Login/Join
 
Guru
posted
I'm working with a self-serve html page that has embedded javascript. After upgrading from 8009 to 8201, some of the javascript doesn't appear to be working. The following 8009 code is not working in 8201. When the user clicks on checkbox1, a year/month option, the year/month listboxes should become active. Thanks.
 
WF 8009 code that worked in 8009 but not in 8201
function checkbox1_onclick(ctrl) {
    if (document.getElementById("checkbox1_0").checked)
       {
          document.getElementById("checkbox2_0").disabled = true;
          document.getElementById("checkbox3_0").disabled = true;
       document.getElementById("checkbox4_0").disabled = true;
          document.getElementById("listbox10").disabled   = true;
          document.getElementById("listbox11").disabled   = true;
          document.getElementById("listbox5").disabled    = false;
          document.getElementById("listbox6").disabled    = false;
          document.getElementById("listbox7").disabled    = true;
       }
       else
       {
          document.getElementById("checkbox2_0").disabled = false;
          document.getElementById("checkbox3_0").disabled = false;
       document.getElementById("checkbox4_0").disabled = false;
          document.getElementById("listbox10").disabled   = true;
          document.getElementById("listbox11").disabled   = true;
          document.getElementById("listbox5").disabled    = true;
          document.getElementById("listbox6").disabled    = true;
          document.getElementById("listbox7").disabled    = true;
//          document.getElementById("calendar1").value      = "        ";
//       document.getElementById("calendar2").value      = "        ";
       }
}
//*
//****************************************************************************************************************************************
//End function checkbox1_onclick


WF 8201 code that I tried, but does not work
//Begin function form1Submit_onclick
function form1Submit_onclick(ctrl) {
}
//End function form1Submit_onclick
//Begin function checkbox1_onclick
//****************************************************************************************************************************************
//* If Month/Year is checked, enable the Month and Year listbox and disable all other date selection options.
//*
function checkbox1_onclick(ctrl) {
    if (document.IbComposer_getComponentById("checkbox1_0").checked)
       {
          document.IbComposer_getComponentById("checkbox2_0").disabled = true;
          document.IbComposer_getComponentById("checkbox3_0").disabled = true;
          document.IbComposer_getComponentById("checkbox4_0").disabled = true;
          document.IbComposer_getComponentById("listbox10").disabled   = true;
          document.IbComposer_getComponentById("listbox11").disabled   = true;
          document.IbComposer_getComponentById("listbox5").disabled    = false;
          document.IbComposer_getComponentById("listbox6").disabled    = false;
          document.IbComposer_getComponentById("listbox7").disabled    = true;
       }
       else
       {
          document.IbComposer_getComponentById("checkbox2_0").disabled = false;
          document.IbComposer_getComponentById("checkbox3_0").disabled = false;
       document.IbComposer_getComponentById("checkbox4_0").disabled = false;
          document.IbComposer_getComponentById("listbox10").disabled   = true;
          document.IbComposer_getComponentById("listbox11").disabled   = true;
          document.IbComposer_getComponentById("listbox5").disabled    = true;
          document.IbComposer_getComponentById("listbox6").disabled    = true;
          document.IbComposer_getComponentById("listbox7").disabled    = true;
//          document.getElementById("calendar1").value      = "        ";
//       document.getElementById("calendar2").value      = "        ";
       }
}
//*
//****************************************************************************************************************************************
//End function checkbox1_onclick
 

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


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Platinum Member
posted Hide Post
Michele did you checked the controls id ? after migration ids are same in both environment pages or changed ?


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10
 
Posts: 186 | Location: Infobuild India | Registered: August 28, 2015Report This Post
Guru
posted Hide Post
First check if the control is properly being called:

function checkbox1_onclick(ctrl) {
alert(IbComposer_getComponentById("checkbox1_0").checked);
if (document.IbComposer_getComponentById("checkbox1_0").checked)
{
document.IbComposer_getComponentById("checkbox2_0").disabled = true;
document.IbComposer_getComponentById("checkbox3_0").disabled = true;
document.IbComposer_getComponentById("checkbox4_0").disabled = true;
document.IbComposer_getComponentById("listbox10").disabled = true;
document.IbComposer_getComponentById("listbox11").disabled = true;
document.IbComposer_getComponentById("listbox5").disabled = false;
document.IbComposer_getComponentById("listbox6").disabled = false;
document.IbComposer_getComponentById("listbox7").disabled = true;
}
else
{
document.IbComposer_getComponentById("checkbox2_0").disabled = false;
document.IbComposer_getComponentById("checkbox3_0").disabled = false;
document.IbComposer_getComponentById("checkbox4_0").disabled = false;
document.IbComposer_getComponentById("listbox10").disabled = true;
document.IbComposer_getComponentById("listbox11").disabled = true;
document.IbComposer_getComponentById("listbox5").disabled = true;
document.IbComposer_getComponentById("listbox6").disabled = true;
document.IbComposer_getComponentById("listbox7").disabled = true;
// document.getElementById("calendar1").value = " ";
// document.getElementById("calendar2").value = " ";
}
}

if you don't get the alert you might need to check if there is a task set for it. There is also a seperate event for this: Checkbox: Check / Checkbox: Uncheck


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Guru
posted Hide Post
quote:
Originally posted by Chaudhary:
Michele did you checked the controls id ? after migration ids are same in both environment pages or changed ?


Thanks for responding. I checked the control ids and they are the same. My javascript doesn't appear to be working for the checkboxes. Might have to redo the entire page.


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Guru
posted Hide Post
quote:
Originally posted by Frans:
First check if the control is properly being called:

function checkbox1_onclick(ctrl) {
alert(IbComposer_getComponentById("checkbox1_0").checked);
if (document.IbComposer_getComponentById("checkbox1_0").checked)
{
document.IbComposer_getComponentById("checkbox2_0").disabled = true;
document.IbComposer_getComponentById("checkbox3_0").disabled = true;
document.IbComposer_getComponentById("checkbox4_0").disabled = true;
document.IbComposer_getComponentById("listbox10").disabled = true;
document.IbComposer_getComponentById("listbox11").disabled = true;
document.IbComposer_getComponentById("listbox5").disabled = false;
document.IbComposer_getComponentById("listbox6").disabled = false;
document.IbComposer_getComponentById("listbox7").disabled = true;
}
else
{
document.IbComposer_getComponentById("checkbox2_0").disabled = false;
document.IbComposer_getComponentById("checkbox3_0").disabled = false;
document.IbComposer_getComponentById("checkbox4_0").disabled = false;
document.IbComposer_getComponentById("listbox10").disabled = true;
document.IbComposer_getComponentById("listbox11").disabled = true;
document.IbComposer_getComponentById("listbox5").disabled = true;
document.IbComposer_getComponentById("listbox6").disabled = true;
document.IbComposer_getComponentById("listbox7").disabled = true;
// document.getElementById("calendar1").value = " ";
// document.getElementById("calendar2").value = " ";
}
}

if you don't get the alert you might need to check if there is a task set for it. There is also a seperate event for this: Checkbox: Check / Checkbox: Uncheck


Thanks for responding. I did not get an alert. There is a task set for it and an event for all of the checkboxes. The javascript for the checkboxes is no longer working.


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Guru
posted Hide Post
In that case I would check your html source and see if the task is there.

it should be something like this

 
<task id="taskx" trigger="click" specifictrigger="checkbox1">
<taskitem id="JavaScript call" sourcetype="typeJScript" targettype="typeJScript" targetname="checkbox1_onclick"/></task>


I would try to remove the task and add it again.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Guru
posted Hide Post
quote:
Originally posted by Frans:
In that case I would check your html source and see if the task is there.

it should be something like this

 
<task id="taskx" trigger="click" specifictrigger="checkbox1">
<taskitem id="JavaScript call" sourcetype="typeJScript" targettype="typeJScript" targetname="checkbox1_onclick"/></task>


I would try to remove the task and add it again.


I did as you suggested. Thanks so much, but it appears that the OnClick Event does not work for one of my list boxes. I had an OnClick Event for listbox3 that was not working properly. I deleted it and tried to add the Event back in. Now, when I hover the mouse over the OnClick Event I get a gray bar that appears. When I click on the ellipse button, it doesn't trigger the Event.


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Guru
posted Hide Post
Hmm but there is no listbox3 in your function. Is listbox3 dependent on one of the other listboxes in your function? You could try IbComposer_ResetDownChainControls(ctrl); to reset the chain.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Guru
posted Hide Post
quote:
Originally posted by Frans:
Hmm but there is no listbox3 in your function. Is listbox3 dependent on one of the other listboxes in your function? You could try IbComposer_ResetDownChainControls(ctrl); to reset the chain.

Listbox3 Event was there, but I had deleted because I couldn't get it to work again. Listbox3 is not dependent on any of the other listboxes. That Event triggers an action when a report in listbox3 is clicked.


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Guru
posted Hide Post
Something seems to be corrupted. I've seen it before with upgrades. I think the best way forward is to manually rebuilt the page with a new htm page or open a case with IBI to let them find what went wrong. If the page is not too complex, I would rebuilt it completely and copy your javascript functions


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report 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] App Studio 8201 Javascript for checkbox

Copyright © 1996-2020 Information Builders