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     [SOLVED] checkbox1_0_onclick with WebFOCUS 8

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] checkbox1_0_onclick with WebFOCUS 8
 Login/Join
 
Guru
posted
Cant we call any JS functions with the inner checkboxes in WebFOCUS 8 as we do in WebFOCUS 7.7 or before?

 //Begin function checkbox1_0_onclick
function checkbox1_0_onclick(ctrl) {
alert('hii.. I am Zero');
}
//End function checkbox1_0_onclick
 


This doesnt seem to work. Then Why is there an "Events" Tab in Properties window to invoke functions for these inner check boxes?

Thanks,
Ram.

This message has been edited. Last edited by: Ramkumar - Webfous,


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Report This Post
Virtuoso
posted Hide Post
Hi,

It does work with WF8009 under IE, FF, GC.
Maybe something else in your code just don't let the execution go up to that alert ?

below HTML generated by the composer with only a check box displaying alert when clicked.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD>
<META id=RLT_STANDARDS_MODE_META http-equiv=X-UA-Compatible content=IE=9>
<META name=mycharsetmeta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
<META name=Generation content="Created in release 8009, Generation 3">
<SCRIPT type=text/javascript>//confidential_id=IBI_OptionsScript
var szHtmlAlias="/ibi_apps/ibi_html";var szRunTimeHtmlAlias="runTimeHtmlAlias";var cgipath="cgipath";var ibirls="ibirls3";var rltdyncalendar="rltdyncalendar";var map="ibimap";var olap="olap";var olappanebase="olappanebase";var olapdrill="olapdrill";var ibiOptions = new Array(cgipath,ibirls);var nlsScript="/javaassist/nls.js";var glbScript="/javaassist/ibi/html/js/ibigbl.js";var replacePart="<replace>";
var scriptTemplate='<SCRIPT src="'+replacePart+'" type="text/javascript"><\/SCRIPT>';if(typeof(szRunTimeHtmlAlias) === 'string' && szRunTimeHtmlAlias.indexOf('/') == 0)szHtmlAlias=szRunTimeHtmlAlias;document.write(scriptTemplate.replace(replacePart, szHtmlAlias + nlsScript));document.write(scriptTemplate.replace(replacePart, szHtmlAlias + glbScript));</SCRIPT>

<SCRIPT type=text/javascript>//confidential_id=IBI_ibigblloadCss
if(typeof ibigblloadCss === 'function'){ibigblloadCss(null);addIntlTranslatedJS("composertrans.js");}else {alert("JavaScript alias '/ibi_apps/ibi_html'  is not valid");window.location("about:blank");}</SCRIPT>
<TITLE>HtmlPage</TITLE><LINK id=ITEM2 rel=stylesheet type=text/css rtFileName="cgipathsub/ibi_html/javaassist/ibi/html/composer/themes/nonBindows/IBI-Themes/default_theme.css"><LINK id=IBI_THEME_CSS rel=stylesheet type=text/css desc="Information Builders" rtFileName="cgipathsub/ibi_html/javaassist/ibi/html/composer/themes/nonBindows/IBI-Themes/ibi.css">
<SCRIPT for=window type=text/javascript eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>

<SCRIPT>//confidential_id=clientEventHandlersJS

//Begin function window_onload
function window_onload() {
 
UpdateData();
 
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload

//Begin function checkbox1_onclick
function checkbox1_onclick(ctrl) {
	alert('hello');
}
//End function checkbox1_onclick

</SCRIPT>
</HEAD>
<BODY class=IBI_PageBg style="OVERFLOW: auto" nextelementuniquenumber="1" thumbnailscale="4" elementtype="21" edaconnectionrequired="false"><SPAN tabIndex=1 class="IBIfield IBI_ReportControlTarget IBI_CheckBox" id=checkbox1 language=javascript style="HEIGHT: 40px; WIDTH: 160px; POSITION: absolute; LEFT: 200px; Z-INDEX: 1; TOP: 50px" contentEditable=false onclick=checkbox1_onclick(this) elementtype="11" persistentuniqueid="compUid_1" groupChildren="1" columns="1">
<TABLE id=table1 style="HEIGHT: 100%; WIDTH: 100%" cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD noWrap><LABEL id=label1 style="CURSOR: default" for=checkbox1_0><INPUT id=checkbox1_0 type=checkbox value=Value1 displaytext="Value1" name="checkbox1">Value1</LABEL></TD></TR></TBODY></TABLE></SPAN><INPUT id=layoutinfo style="POSITION: absolute; LEFT: -100px; TOP: -100px" type=hidden resourcectrlids="ITEM2;IBI_THEME_CSS" name="inputhidden1"><INPUT id=ibiapp_app style="POSITION: absolute; LEFT: -100px; TOP: -100px" type=hidden value=std_reports ismre="1" name="ibiapp_app"><INPUT id=ibif_ex style="POSITION: absolute; LEFT: -100px; TOP: -100px" type=hidden value=/WFC/Repository/itr6g4h7/std_reports/reportsi3mkm/New_Html.htm name="ibif_ex"><xml id=focus_xmlelement><script type="text/xml" nextelementuniquenumber="2"><rootxmlnode focoption="_FOC_NULL"><variables></variables><input_controls><input_control bindcontrolid="compUid_1" elementtype="11" name="checkbox1" id="checkbox1" multiple="0" onetimepopulated="1"><link linktype="default" persistentuniqueid="compUid_1"><condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0"><data_info datatype="0" modifiedrequest="0" sourcetype="typeMaster"><static_values><static value="Value1" display="Value1" selected="0" noinput="0"></static></static_values></data_info></condition></link></input_control></input_controls><requests></requests><other_bound_objects></other_bound_objects>
</rootxmlnode></script>
</xml></BODY>
<SCRIPT type=text/javascript>//confidential_id=IBI_loader
if(typeof doBeforeLoad === 'function'){doBeforeLoad();}function AdjustChildrenPosition(){
}
</SCRIPT>
</HTML>
<!-- cc krvl -->


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
Member
posted Hide Post
Hi Martin,

onclick event is working for parent node of checkbox, and able to get the id of checkbox is checked. But the issue with child nodes of checkbox. When ever clicking on check box group, event is triggered getting id of parent node, irrespective of child node is selected.

In earlier versions of WF (i.e. WF 77.x), able to call a function directly from child node of check box (i.e checkbox1_0 or checkbox1_1, etc..) to get id of child nodes which event is triggered. This functionality is not working in WF8.0.08.

So looks like need to go for an workaround to achieve this.

Workaround:
-------------
function validate_checkbox_periods_sp(ctrl)
{
var chk_parent_id = ctrl.getAttribute("id");
var elements = document.getElementsByName(chk_parent_id);
for (i=1; i < elements.length; i++)
{
if (elements[i].checked )
{
var chk_child_id = elements[i].getAttribute( 'id' );
}
}
}
-------------
"
<SPAN tabIndex=245 id=checkbox1 style="FONT-SIZE: 11px; HEIGHT: 381px; FONT-FAMILY: Arial; WIDTH: 226px; POSITION: absolute; FONT-WEIGHT: bold; LEFT: 15px; Z-INDEX: 184; TOP: 183px" contentEditable=false onclick=validate_checkbox_periods_sp[this) elementtype="11" persistentuniqueid="compUid_1" defaultselection="0" multiple="multiple" groupChildren="1" columns="1" name="checkbox1">
<TABLE id=table14 style="FONT-SIZE: 11px; HEIGHT: 100%; WIDTH: 100%; FONT-WEIGHT: bold" contentEditable=false cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD noWrap><LABEL id=checkbox1_LABEL_0 style="CURSOR: default" for=checkbox1_0><INPUT tabIndex=245 id=checkbox1_0 type=checkbox value="checkbox2" noinput="0" displaytext="Summary" name="checkbox1">Summary</LABEL></TD></TR>
<TR>
<TD noWrap><LABEL id=checkbox1_LABEL_1 style="CURSOR: default" for=checkbox1_1><INPUT tabIndex=245 id=checkbox1_1 type=checkbox value="checkbox3" defaultselection="1" noinput="0" displaytext="Avg" name="checkbox1">Avg</LABEL></TD></TR>
<TR>
<TD noWrap><LABEL id=checkbox1_LABEL_2 style="CURSOR: default" for=checkbox1_2><INPUT tabIndex=245 id=checkbox1_2 type=checkbox value="checkbox4" noinput="0" displaytext="Processed" name="checkbox1">Processed</LABEL></TD></TR></TBODY></TABLE></SPAN> "

This message has been edited. Last edited by: Yasher,


WebFOCUS 7.7.xx, 8.0.08
Windows, All Outputs
 
Posts: 1 | Registered: October 24, 2013Report This Post
Guru
posted Hide Post
Ramkumar, have you tried using the IbComposer functions? I think I would try the IbComposer_getCurrentSelection function.


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
 
Posts: 319 | Location: Stockholm, Sweden | Registered: February 04, 2004Report This Post
Guru
posted Hide Post
Thanks for the Suggestions. Will give them a try.


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Report 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     [SOLVED] checkbox1_0_onclick with WebFOCUS 8

Copyright © 1996-2020 Information Builders