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]Weird error in HTML composer

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Weird error in HTML composer
 Login/Join
 
Guru
posted
Hi,

Iam using the HTML Composer to create the Launchpage/HTML screen and the report runs fine till this point.
I have created a JS file for the validation purpose and once I insert this in the HTML Composer(via Insert -->Script) and try running the report, Iam getting the werid error saying :

Line :7
Char :764
Error:Unable to get value of the property '0'Red Facebject is null or undefined
Code :0
URL:http://wfdev.corp.intranet/ibi_apps/ibi_html/javaassist/ibi/html/js/rltcalendarInit.js

I have 2 calendar controls in my component.

Any help would be appreciated!

Thanks a lot in advance!

Regards!

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


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Guru
posted Hide Post
Can you remove the script and it works fine? I get nervous anytime I modify any HTML in Composer that's why I make plenty of backups during development.

I have seen things go bad in a hurry.

Have you tried just putting in your JS in the tab instead of using a file? Assuming your using Dev Studio.


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Guru
posted Hide Post
Hi,

Yes, the report works fine if I just drag and drop the components in the HTML composer without any validation and am using dev studio..

To do the validation using javascript,Iam using either of these methods :
1)I insert the JS file using the insert option in HTML composer
2)Without using the JS file in the HTML Composer,I directly add the validation function in the HTML code.

I tried both these methods but again it throws the same error message.

Hope Iam clear now!

Thanks a lot for your help!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Guru
posted Hide Post
I would start adding in my JS one function at a time. It looks like you are not getting anything from the object. Are you trying to get the properties of a calendar control?


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Virtuoso
posted Hide Post
Do you have other controls on your HTML ?

It seems that js is trying to perform an action on a control that it's not yet loaded.

Just to confirm that it's not the case, put the js into an event of a control such as an onclick event. That way the js won't execute until you click on the control.

If the page initially load without the error and only occurs when you click on control with the event, my thought is confirmed.

Must insure that the page is fully loaded prior to process with the validation.

This may be a track to follow...


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

MattC - I have added only 1 function in the JS page.

MartinY - I have other components like Dropdown,textbox and calendarcontrol.
To test my report,I removed the calendar control from my HTML page and tried running the report and my HTML page runs fine with validation(Validation is being done on the dropdown).

Thanks a lot !


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Virtuoso
posted Hide Post
Can you share your js with us ?


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

Please find my JS code below :

//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

function setDdd2(combobox1)
{ if (combobox1.value == ('AView'))
{ document.getElementById('combobox2').disabled = true;
}
else
{
document.getElementById('combobox2').disabled = false;
}
}


Finally I will call this function on the combobox1 as shown below :
id="combobox1" onchange="setDdd2(this)"

Thanks!

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


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Expert
posted Hide Post
So I guess that you have an "onchange" event attached to your form object which has the "id" attribute "combobox1"?

It is unlikely that you have coded the "onchange" event to pass the object of "combobox1" so the quickest and easiest way would be for you to change you setDd2 function to -

function setDdd2() {
  if (document.getElementById('combobox1').value === 'AView') {
    document.getElementById('combobox2').disabled = true;
  } else {
    document.getElementById('combobox2').disabled = false;
  }
}

A quick tip, use indenting within your code. It may appear that you are being anal about neat code, but it does make a big difference in the speed at which you (and anyone coming behind you to support it!) can read and understand it.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Guru
posted Hide Post
Hi Tony,

Sure I will follow the indentation moving forward.
I tried your method also but nothing seems to be working:

Please see my code below :

<!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 content=IE=9 http-equiv=X-UA-Compatible>
<META name=mycharsetmeta content="text/html; charset=ISO-8859-1" http-equiv=Content-Type>
<META name=Generation content="Created in release 8005, 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,rltdyncalendar);var nlsScript="/javaassist/nls.js";var nlsVarsScript="/javaassist/nlsvars.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 + nlsVarsScript));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 UserSuppliedFullPath="1" 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 UserSuppliedFullPath="1" 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
</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" class=IBI_PageBg edaconnectionrequired="true" elementtype="21" thumbnailscale="4" maptype="0" nextelementuniquenumber="45"> <SPAN style="Z-INDEX: 36; POSITION: absolute; WIDTH: 290px; FONT-FAMILY: Arial; HEIGHT: 20px; COLOR: rgb(51,153,255); FONT-SIZE: 10pt; FONT-WEIGHT: bold; TOP: 90px; LEFT: 80px" id=text1 class=IBIfield tabIndex=3 elementtype="4">Report Title</SPAN><SPAN style="Z-INDEX: 37; POSITION: absolute; WIDTH: 170px; HEIGHT: 20px; TOP: 130px; LEFT: 30px" id=text2 class=IBIfield tabIndex=4 elementtype="4">Section:</SPAN><SPAN style="Z-INDEX: 38; POSITION: absolute; WIDTH: 170px; HEIGHT: 20px; TOP: 170px; LEFT: 30px" id=text4 class=IBIfield tabIndex=5 elementtype="4" name="text4" persistentuniqueid="compUid_2"> Period:</SPAN><SPAN style="Z-INDEX: 41; POSITION: absolute; WIDTH: 170px; HEIGHT: 20px; TOP: 260px; LEFT: 30px" id=text7 class=IBIfield tabIndex=8 elementtype="4" name="text7" persistentuniqueid="compUid_5"> ID(s):</SPAN><SPAN style="Z-INDEX: 42; POSITION: absolute; WIDTH: 170px; HEIGHT: 26px; TOP: 210px; LEFT: 30px" id=text8 class=IBIfield tabIndex=9 elementtype="4" name="text8" persistentuniqueid="compUid_6">Date Range:<BR>FROM (MM/DD/YYYY) :</SPAN><SPAN style="Z-INDEX: 43; POSITION: absolute; WIDTH: 170px; HEIGHT: 20px; TOP: 310px; LEFT: 30px" id=text9 class=IBIfield tabIndex=10 elementtype="4" name="text9" persistentuniqueid="compUid_7">Status(s):</SPAN> <SELECT style="Z-INDEX: 46; POSITION: absolute; WIDTH: 200px; TOP: 130px; LEFT: 220px" id=combobox1 class="IBIfield IBI_ReportControlTarget IBI_rounded_s" tabIndex=13 persistentuniqueid="compUid_10" defaultselection="1" name="combobox1"><OPTION selected value="A View" displaytext="A View" noinput="0">A View</OPTION><OPTION value="B View" displaytext="B View" noinput="0">B View</OPTION><OPTION value="C View" displaytext="C View" noinput="0">C View</OPTION></SELECT><SELECT style="Z-INDEX: 47; POSITION: absolute; WIDTH: 200px; TOP: 170px; LEFT: 220px" id=combobox2 class="IBIfield IBI_ReportControlTarget IBI_rounded_s" tabIndex=14 persistentuniqueid="compUid_11" defaultselection="1" name="combobox2"><OPTION selected value="Jan 15" displaytext="Jan 15" noinput="0">Jan 15</OPTION><OPTION value="Feb 15" displaytext="Feb 15" noinput="0">Feb 15</OPTION><OPTION value="Mar 15" displaytext="Mar 15" noinput="0">Mar 15</OPTION></SELECT><INPUT style="Z-INDEX: 48; POSITION: absolute; WIDTH: 200px; TOP: 210px; LEFT: 220px" id=calendar1 tabIndex=15 elementtype="14" persistentuniqueid="compUid_12" defaultselection="1" name="calendar1"><INPUT style="Z-INDEX: 49; POSITION: absolute; WIDTH: 200px; TOP: 260px; LEFT: 220px" id=edit1 class="IBIfield IBI_ReportControlTarget  IBI_rounded_s IBI_TextBox" tabIndex=16 type=text persistentuniqueid="compUid_13" defaultselection="1" name="edit1"><SELECT style="Z-INDEX: 52; POSITION: absolute; WIDTH: 200px; TOP: 310px; LEFT: 220px" id=combobox3 class="IBIfield IBI_ReportControlTarget IBI_rounded_s" tabIndex=19 persistentuniqueid="compUid_16" defaultselection="1" name="combobox3"></SELECT> <SPAN style="Z-INDEX: 55; POSITION: absolute; WIDTH: 170px; HEIGHT: 20px; TOP: 210px; LEFT: 500px" id=text12 class=IBIfield tabIndex=22 elementtype="4">TO(MM/DD/YYYY):</SPAN><SPAN style="Z-INDEX: 58; POSITION: absolute; WIDTH: 170px; HEIGHT: 20px; TOP: 260px; LEFT: 500px" id=text15 class=IBIfield tabIndex=25 elementtype="4" name="text15" persistentuniqueid="compUid_21"> Name(s):</SPAN><INPUT style="Z-INDEX: 61; POSITION: absolute; WIDTH: 200px; TOP: 210px; LEFT: 710px" id=calendar2 tabIndex=28 elementtype="14" persistentuniqueid="compUid_24" defaultselection="1" name="calendar2"><INPUT style="Z-INDEX: 62; POSITION: absolute; WIDTH: 200px; TOP: 260px; LEFT: 710px" id=edit4 class="IBIfield IBI_ReportControlTarget  IBI_rounded_s IBI_TextBox" tabIndex=29 type=text persistentuniqueid="compUid_25" defaultselection="1" name="edit4"><SPAN style="Z-INDEX: 67; POSITION: absolute; WIDTH: 170px; HEIGHT: 20px; TOP: 310px; LEFT: 500px" id=text18 class=IBIfield tabIndex=34 elementtype="4" name="text18" persistentunique
id="compUid_30">Output:</SPAN><SELECT style="Z-INDEX: 68; POSITION: absolute; WIDTH: 200px; TOP: 310px; LEFT: 710px" id=combobox8 class="IBIfield IBI_ReportControlTarget IBI_rounded_s" tabIndex=35 persistentuniqueid="compUid_31" defaultselection="1" name="combobox8"><OPTION selected value=EXCEL displaytext="Excel" noinput="0">Excel</OPTION><OPTION value=HTML_FORMAT displaytext="Active Report" noinput="0">Active Report</OPTION><OPTION value=PDF displaytext="Pdf" noinput="0">Pdf</OPTION><OPTION value=TEXT displaytext="Text" noinput="0">Text</OPTION></SELECT><INPUT style="Z-INDEX: 69; POSITION: absolute; WIDTH: 130px; HEIGHT: 30px; TOP: 380px; LEFT: 240px" id=reset1 class="IBIfield IBI_button" tabIndex=36 value=Clear size=16 type=reset name="reset1"> <INPUT style="Z-INDEX: 70; POSITION: absolute; WIDTH: 130px; HEIGHT: 30px; TOP: 380px; LEFT: 400px" id=button1 class="IBIfield IBI_button" tabIndex=37 value=Submit type=button name="button1"><INPUT style="Z-INDEX: 71; POSITION: absolute; WIDTH: 130px; HEIGHT: 30px; TOP: 380px; LEFT: 560px" id=button2 class="IBIfield IBI_button" tabIndex=38 value=Deferred type=button name="button2">    <INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=layoutinfo type=hidden resourcectrlids="ITEM2;IBI_THEME_CSS" name="inputhidden1"><INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibiapp_app value=Sales_Comp type=hidden ismre="1" name="ibiapp_app"><INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibif_ex value=/WFC/Repository/Sales_Comp/H_Complex_Report/5600_SCSR_Parameter_Page1.htm type=hidden name="ibif_ex"><xml id=focus_xmlelement><script type="text/xml" nextelementuniquenumber="21"><rootxmlnode focoption="_FOC_NULL"><variables></variables><input_controls><input_control bindcontrolid="compUid_10" elementtype="8" name="combobox1" id="combobox1" 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="A View" display="A View" selected="1" noinput="0"></static><static value="B View" display="B View" selected="0" noinput="0"></static><static value="C View" display="C View" selected="0" noinput="0"></static></static_values></data_info></condition></link></input_control><input_control bindcontrolid="compUid_11" elementtype="8" name="combobox2" id="combobox2" multiple="0" onetimepopulated="1"><link linktype="default" persistentuniqueid="compUid_2"><condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0"><data_info datatype="0" modifiedrequest="0" sourcetype="typeFex" checkForDuplicateValues="0" datasource="/WFC/Repository/Sales_Comp/H_Complex_Report/Comp_period_populate.fex" ibif_ex="/WFC/Repository/Sales_Comp/H_Complex_Report/Comp_period_populate" displayfield="PERIOD_NM" datafield="PERIOD_NM" requestid="0"><![CDATA[]]><static_values><static value="Jan 15" display="Jan 15" selected="1" noinput="0"></static><static value="Feb 15" display="Feb 15" selected="0" noinput="0"></static><static value="Mar 15" display="Mar 15" selected="0" noinput="0"></static></static_values></data_info></condition></link></input_control><input_control bindcontrolid="compUid_12" elementtype="14" name="calendar1" id="calendar1" multiple="0" onetimepopulated="1"><link linktype="default" persistentuniqueid="compUid_3"><condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0"><data_info datatype="0" modifiedrequest="0" calendardata="0/0/-10;0/0/10" calendardatatype="1" ibiformat="YMD" accept="0" sourcetype="typeMaster"><static_values><static value="" display="" selected="0" noinput="0"></static></static_values></data_info></condition></link></input_control><input_control bindcontrolid="compUid_13" elementtype="7
" name="edit1" id="edit1" multiple="0" onetimepopulated="1"><link linktype="default" persistentuniqueid="compUid_4"><condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0"><data_info datatype="0" modifiedrequest="0" accept="0" sourcetype="typeMaster"><static_values><static value="" display="" selected="0" noinput="0"></static></static_values></data_info></condition></link></input_control><input_control bindcontrolid="compUid_16" elementtype="8" name="combobox3" id="combobox3" multiple="0" onetimepopulated="0"><link linktype="default" persistentuniqueid="compUid_7"><condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0"><data_info datatype="1" modifiedrequest="0" sourcetype="typeFex" checkForDuplicateValues="0" datasource="/WFC/Repository/Sales_Comp/H_Complex_Report/Validation_Status.fex" ibif_ex="/WFC/Repository/Sales_Comp/H_Complex_Report/Validation_Status" displayfield="STATUS_D" datafield="STATUS_D" requestid="2"><![CDATA[]]></data_info></condition></link></input_control><input_control bindcontrolid="compUid_24" elementtype="14" name="calendar2" id="calendar2" multiple="0" onetimepopulated="1"><link linktype="default" persistentuniqueid="compUid_10"><condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0"><data_info datatype="0" modifiedrequest="0" calendardata="0/0/-10;0/0/10" calendardatatype="1" ibiformat="YMD" accept="0" sourcetype="typeMaster"><static_values><static value="" display="" selected="0" noinput="0"></static></static_values></data_info></condition></link></input_control><input_control bindcontrolid="compUid_25" elementtype="7" name="edit4" id="edit4" multiple="0" onetimepopulated="1"><link linktype="default" persistentuniqueid="compUid_11"><condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0"><data_info datatype="0" modifiedrequest="0" accept="0" sourcetype="typeMaster"><static_values><static value="" display="" selected="0" noinput="0"></static></static_values></data_info></condition></link></input_control><input_control bindcontrolid="compUid_31" elementtype="8" name="combobox8" id="combobox8" multiple="0" onetimepopulated="1"><link linktype="default" persistentuniqueid="compUid_16"><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="EXCEL" display="Excel" selected="1" noinput="0"></static><static value="HTML_FORMAT" display="Active Report" selected="0" noinput="0"></static><static value="PDF" display="Pdf" selected="0" noinput="0"></static><static value="TEXT" display="Text" selected="0" noinput="0"></static></static_values></data_info></condition></link></input_control></input_controls><requests nextrequestsid="5"/><other_bound_objects></other_bound_objects></rootxmlnode></script>
</xml></BODY>
<SCRIPT type=text/javascript>//confidential_id=IBI_loader
if(ibigblInitInfo.testOptions(rltdyncalendar) && (typeof setDateRange === 'function')){setDateRange();setupDocCalendars();}
if(typeof doBeforeLoad === 'function'){doBeforeLoad();}function AdjustChildrenPosition(){
}
</SCRIPT>
</HTML>
<!-- cc fyrvp -->
  



Thanks!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Expert
posted Hide Post
One reason that nothing was happening maybe because the value that you are passing in combobox1 is not "AView" but "A View".

Also, the code that you have posted does not have an "onchange" event attached to combobox1? Nor does it have the JS to disabled combobox2?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Guru
posted Hide Post
Hi Tony,

The issue is not with the AView.It might be a typo.[Aview or AView is not the problem here]
Yes I had not included the validation part in the above code.

Please find my validation part below :
function setDdd2(combobox1)
{ if (combobox1.value == ('AView'))
{ document.getElementById('combobox2').disabled = true;
}
else
{
document.getElementById('combobox2').disabled = false;
}
}
And finally I will call this function on the onchange event of combobox1 i.e.,
id="combobox1" onchange="setDdd2(this)"

Hope Iam clear now.

Thanks!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Guru
posted Hide Post
Hi,

The code[HTML] which I had posted above runs fine if I do not include the validation part and once I do add it, then It throws the same error message which I had stated earlier....


Thanks!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Guru
posted Hide Post
Hi,

This is my code with the Javascript validation included:

 <!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 content=IE=9 http-equiv=X-UA-Compatible>
<META name=mycharsetmeta content="text/html; charset=ISO-8859-1" http-equiv=Content-Type>
<META name=Generation content="Created in release 8005, 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,rltdyncalendar);var nlsScript="/javaassist/nls.js";var nlsVarsScript="/javaassist/nlsvars.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 + nlsVarsScript));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 UserSuppliedFullPath="1" 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 UserSuppliedFullPath="1" 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
function setDdd2(combobox1)
{ if (combobox1.value == ('A View'))
{ document.getElementById('combobox2').disabled = true;
}
else
{
document.getElementById('combobox2').disabled = false;
}
}
</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" class=IBI_PageBg edaconnectionrequired="true" elementtype="21" thumbnailscale="4" maptype="0" nextelementuniquenumber="45"> <SPAN style="Z-INDEX: 36; POSITION: absolute; WIDTH: 290px; FONT-FAMILY: Arial; HEIGHT: 20px; COLOR: rgb(51,153,255); FONT-SIZE: 10pt; FONT-WEIGHT: bold; TOP: 90px; LEFT: 80px" id=text1 class=IBIfield tabIndex=3 elementtype="4">Report Title</SPAN><SPAN style="Z-INDEX: 37; POSITION: absolute; WIDTH: 170px; HEIGHT: 20px; TOP: 130px; LEFT: 30px" id=text2 class=IBIfield tabIndex=4 elementtype="4">Section:</SPAN><SPAN style="Z-INDEX: 38; POSITION: absolute; WIDTH: 170px; HEIGHT: 20px; TOP: 170px; LEFT: 30px" id=text4 class=IBIfield tabIndex=5 elementtype="4" name="text4" persistentuniqueid="compUid_2"> Period:</SPAN><SPAN style="Z-INDEX: 41; POSITION: absolute; WIDTH: 170px; HEIGHT: 20px; TOP: 260px; LEFT: 30px" id=text7 class=IBIfield tabIndex=8 elementtype="4" name="text7" persistentuniqueid="compUid_5"> ID(s):</SPAN><SPAN style="Z-INDEX: 42; POSITION: absolute; WIDTH: 170px; HEIGHT: 26px; TOP: 210px; LEFT: 30px" id=text8 class=IBIfield tabIndex=9 elementtype="4" name="text8" persistentuniqueid="compUid_6">Date Range:<BR>FROM (MM/DD/YYYY) :</SPAN><SPAN style="Z-INDEX: 43; POSITION: absolute; WIDTH: 170px; HEIGHT: 20px; TOP: 310px; LEFT: 30px" id=text9 class=IBIfield tabIndex=10 elementtype="4" name="text9" persistentuniqueid="compUid_7">Status(s):</SPAN> <SELECT style="Z-INDEX: 46; POSITION: absolute; WIDTH: 200px; TOP: 130px; LEFT: 220px" id=combobox1 class="IBIfield IBI_ReportControlTarget IBI_rounded_s" tabIndex=13 onchange="setDdd2(this)" persistentuniqueid="compUid_10" defaultselection="1" name="combobox1"><OPTION selected value="A View" displaytext="A View" noinput="0">A View</OPTION><OPTION value="B View" displaytext="B View" noinput="0">B View</OPTION><OPTION value="C View" displaytext="C View" noinput="0">C View</OPTION></SELECT><SELECT style="Z-INDEX: 47; POSITION: absolute; WIDTH: 200px; TOP: 170px; LEFT: 220px" id=combobox2 class="IBIfield IBI_ReportControlTarget IBI_rounded_s" tabIndex=14 persistentuniqueid="compUid_11" defaultselection="1" name="combobox2"><OPTION selected value="Jan 15" displaytext="Jan 15" noinput="0">Jan 15</OPTION><OPTION value="Feb 15" displaytext="Feb 15" noinput="0">Feb 15</OPTION><OPTION value="Mar 15" displaytext="Mar 15" noinput="0">Mar 15</OPTION></SELECT><INPUT style="Z-INDEX: 48; POSITION: absolute; WIDTH: 200px; TOP: 210px; LEFT: 220px" id=calendar1 tabIndex=15 elementtype="14" persistentuniqueid="compUid_12" defaultselection="1" name="calendar1"><INPUT style="Z-INDEX: 49; POSITION: absolute; WIDTH: 200px; TOP: 260px; LEFT: 220px" id=edit1 class="IBIfield IBI_ReportControlTarget  IBI_rounded_s IBI_TextBox" tabIndex=16 type=text persistentuniqueid="compUid_13" defaultselection="1" name="edit1"><SELECT style="Z-INDEX: 52; POSITION: absolute; WIDTH: 200px; TOP: 310px; LEFT: 220px" id=combobox3 class="IBIfield IBI_ReportControlTarget IBI_rounded_s" tabIndex=19 persistentuniqueid="compUid_16" defaultselection="1" name="combobox3"></SELECT> <SPAN style="Z-INDEX: 55; POSITION: absolute; WIDTH: 170px; HEIGHT: 20px; TOP: 210px; LEFT: 500px" id=text12 class=IBIfield tabIndex=22 elementtype="4">TO(MM/DD/YYYY):</SPAN><SPAN style="Z-INDEX: 58; POSITION: absolute; WIDTH: 170px; HEIGHT: 20px; TOP: 260px; LEFT: 500px" id=text15 class=IBIfield tabIndex=25 elementtype="4" name="text15" persistentuniqueid="compUid_21"> Name(s):</SPAN><INPUT style="Z-INDEX: 61; POSITION: absolute; WIDTH: 200px; TOP: 210px; LEFT: 710px" id=calendar2 tabIndex=28 elementtype="14" persistentuniqueid="compUid_24" defaultselection="1" name="calendar2"><INPUT style="Z-INDEX: 62; POSITION: absolute; WIDTH: 200px; TOP: 260px; LEFT: 710px" id=edit4 class="IBIfield IBI_ReportControlTarget  IBI_rounded_s IBI_TextBox" tabIndex=29 type=text persistentuniqueid="compUid_25" defaultselection="1" name="edit4"><SPAN style="Z-INDEX: 67; POSITION: absolute; WIDTH: 170px; HEIGHT: 20px; TOP: 310px; LEFT: 500px" id=text18 class=IBIfield tabIndex=34 elementtype="4" name="text18" persistentunique
id="compUid_30">Output:</SPAN><SELECT style="Z-INDEX: 68; POSITION: absolute; WIDTH: 200px; TOP: 310px; LEFT: 710px" id=combobox8 class="IBIfield IBI_ReportControlTarget IBI_rounded_s" tabIndex=35 persistentuniqueid="compUid_31" defaultselection="1" name="combobox8"><OPTION selected value=EXCEL displaytext="Excel" noinput="0">Excel</OPTION><OPTION value=HTML_FORMAT displaytext="Active Report" noinput="0">Active Report</OPTION><OPTION value=PDF displaytext="Pdf" noinput="0">Pdf</OPTION><OPTION value=TEXT displaytext="Text" noinput="0">Text</OPTION></SELECT><INPUT style="Z-INDEX: 69; POSITION: absolute; WIDTH: 130px; HEIGHT: 30px; TOP: 380px; LEFT: 240px" id=reset1 class="IBIfield IBI_button" tabIndex=36 value=Clear size=16 type=reset name="reset1"> <INPUT style="Z-INDEX: 70; POSITION: absolute; WIDTH: 130px; HEIGHT: 30px; TOP: 380px; LEFT: 400px" id=button1 class="IBIfield IBI_button" tabIndex=37 value=Submit type=button name="button1"><INPUT style="Z-INDEX: 71; POSITION: absolute; WIDTH: 130px; HEIGHT: 30px; TOP: 380px; LEFT: 560px" id=button2 class="IBIfield IBI_button" tabIndex=38 value=Deferred type=button name="button2">    <INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=layoutinfo type=hidden resourcectrlids="ITEM2;IBI_THEME_CSS" name="inputhidden1"><INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibiapp_app value=Sales_Comp type=hidden ismre="1" name="ibiapp_app"><INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibif_ex value=/WFC/Repository/Sales_Comp/H_Complex_Report/5600_SCSR_Parameter_Page1.htm type=hidden name="ibif_ex"><xml id=focus_xmlelement><script type="text/xml" nextelementuniquenumber="21"><rootxmlnode focoption="_FOC_NULL"><variables></variables><input_controls><input_control bindcontrolid="compUid_10" elementtype="8" name="combobox1" id="combobox1" 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="A View" display="A View" selected="1" noinput="0"></static><static value="B View" display="B View" selected="0" noinput="0"></static><static value="C View" display="C View" selected="0" noinput="0"></static></static_values></data_info></condition></link></input_control><input_control bindcontrolid="compUid_11" elementtype="8" name="combobox2" id="combobox2" multiple="0" onetimepopulated="1"><link linktype="default" persistentuniqueid="compUid_2"><condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0"><data_info datatype="0" modifiedrequest="0" sourcetype="typeFex" checkForDuplicateValues="0" datasource="/WFC/Repository/Sales_Comp/H_Complex_Report/Comp_period_populate.fex" ibif_ex="/WFC/Repository/Sales_Comp/H_Complex_Report/Comp_period_populate" displayfield="PERIOD_NM" datafield="PERIOD_NM" requestid="0"><![CDATA[]]><static_values><static value="Jan 15" display="Jan 15" selected="1" noinput="0"></static><static value="Feb 15" display="Feb 15" selected="0" noinput="0"></static><static value="Mar 15" display="Mar 15" selected="0" noinput="0"></static></static_values></data_info></condition></link></input_control><input_control bindcontrolid="compUid_12" elementtype="14" name="calendar1" id="calendar1" multiple="0" onetimepopulated="1"><link linktype="default" persistentuniqueid="compUid_3"><condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0"><data_info datatype="0" modifiedrequest="0" calendardata="0/0/-10;0/0/10" calendardatatype="1" ibiformat="YMD" accept="0" sourcetype="typeMaster"><static_values><static value="" display="" selected="0" noinput="0"></static></static_values></data_info></condition></link></input_control><input_control bindcontrolid="compUid_13" elementtype="7
" name="edit1" id="edit1" multiple="0" onetimepopulated="1"><link linktype="default" persistentuniqueid="compUid_4"><condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0"><data_info datatype="0" modifiedrequest="0" accept="0" sourcetype="typeMaster"><static_values><static value="" display="" selected="0" noinput="0"></static></static_values></data_info></condition></link></input_control><input_control bindcontrolid="compUid_16" elementtype="8" name="combobox3" id="combobox3" multiple="0" onetimepopulated="0"><link linktype="default" persistentuniqueid="compUid_7"><condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0"><data_info datatype="1" modifiedrequest="0" sourcetype="typeFex" checkForDuplicateValues="0" datasource="/WFC/Repository/Sales_Comp/H_Complex_Report/Validation_Status.fex" ibif_ex="/WFC/Repository/Sales_Comp/H_Complex_Report/Validation_Status" displayfield="STATUS_D" datafield="STATUS_D" requestid="2"><![CDATA[]]></data_info></condition></link></input_control><input_control bindcontrolid="compUid_24" elementtype="14" name="calendar2" id="calendar2" multiple="0" onetimepopulated="1"><link linktype="default" persistentuniqueid="compUid_10"><condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0"><data_info datatype="0" modifiedrequest="0" calendardata="0/0/-10;0/0/10" calendardatatype="1" ibiformat="YMD" accept="0" sourcetype="typeMaster"><static_values><static value="" display="" selected="0" noinput="0"></static></static_values></data_info></condition></link></input_control><input_control bindcontrolid="compUid_25" elementtype="7" name="edit4" id="edit4" multiple="0" onetimepopulated="1"><link linktype="default" persistentuniqueid="compUid_11"><condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0"><data_info datatype="0" modifiedrequest="0" accept="0" sourcetype="typeMaster"><static_values><static value="" display="" selected="0" noinput="0"></static></static_values></data_info></condition></link></input_control><input_control bindcontrolid="compUid_31" elementtype="8" name="combobox8" id="combobox8" multiple="0" onetimepopulated="1"><link linktype="default" persistentuniqueid="compUid_16"><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="EXCEL" display="Excel" selected="1" noinput="0"></static><static value="HTML_FORMAT" display="Active Report" selected="0" noinput="0"></static><static value="PDF" display="Pdf" selected="0" noinput="0"></static><static value="TEXT" display="Text" selected="0" noinput="0"></static></static_values></data_info></condition></link></input_control></input_controls><requests nextrequestsid="5"/><other_bound_objects></other_bound_objects></rootxmlnode></script>
</xml></BODY>
<SCRIPT type=text/javascript>//confidential_id=IBI_loader
if(ibigblInitInfo.testOptions(rltdyncalendar) && (typeof setDateRange === 'function')){setDateRange();setupDocCalendars();}
if(typeof doBeforeLoad === 'function'){doBeforeLoad();}function AdjustChildrenPosition(){
}
</SCRIPT>
</HTML>
<!-- cc fyrvp --> 


Thanks!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Guru
posted Hide Post
I am no expert at JS, but I would not think you can do an IF condition before you even have a variable set for combobox1.

How does it know the value for combobox1?

quote:
function setDdd2(combobox1)
{ if (combobox1.value == ('A View'))
{ document.getElementById('combobox2').disabled = true;
}
else
{
document.getElementById('combobox2').disabled = false;
}
}



Add this

var Cbox1 = IbComposer_getCurrentSelection('combobox1');

  


and use this in your IF conditions

 
      IbComposer_setCurrentSelection('combobox1', '1', false);
 

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


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Virtuoso
posted Hide Post
Why not keeping
function setDdd2(combobox1)

as
function setDdd2(ctrl)


And I also notice that:
if(ibigblInitInfo.testOptions(rltdyncalendar) && (typeof setDateRange === 'function')){setDateRange();setupDocCalendars();}

if(typeof doBeforeLoad === 'function'){doBeforeLoad();}function AdjustChildrenPosition()

if(typeof(szRunTimeHtmlAlias) === 'string'

have 3 times the equal sign ===

And finally, put the WHOLE code between [ code] [ /code] tag. Also it's more difficult when code is not properly indented and displayed on one single line.


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

The === is a valid JavaScript test.

The code is displayed like that because IP has copy pasted it direct from the file and that is how DS constructs it.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
quote:
and once I do add it

Are you using text editor to add the code or adding it via HTML composer?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Guru
posted Hide Post
Hi,

Mattc - The If condition works fine and I have validated it.It is throwing this error when I add the calendar control.If I remove the calendar control from the HTML page,the validation part is working fine.

Tony A - I just drag and drop the controls using the HTML composer everytime and to add only the Javascript validations,I do edit in the Text editor.

Hope Iam clear now.

Thanks!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Expert
posted Hide Post
quote:
using the HTML composer everytime

IP,

That's good because the HTML that you posted would not have worked after inserting via the text editor as, at least, one of the line of code would cause an issue. I just wanted to be sure that wasn't the cause of further problems.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Guru
posted Hide Post
Hi Tony,

I do the Javascript validations in the Text editor mode only upon drag and drop of the controls in the HTML Composer and every time my Javascript works fine except for this one...Iam not sure why Iam getting this kind of errorFrownerFrowner

Any hints/ideas on how to resolve this is appreciated!

Thanks a lot for all the help!

Thanks!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Master
posted Hide Post
info4pal,

Your HTML is breaking in the middle of your tags. If you were to never open the page in the text editor, this wouldn't ever be a problem. If all your doing is adding JS functions, you never need to do it in the text editor. The HTML Composer has an area for you to add your JS and you can add your onchange event through the properties of the element you want to effect.

Now that you have opened this up in the editor, the editor has some line length specification that will break the line at some point. It physically puts this break into the code, instead of just handling it as a display back to the user. The way to handle this is to "Fix" what the composer breaks. (I would call this out as a bug, but I'm tired of being told I have no reason to go into the code and fix what the composer breaks or can't handle). Basically, you need to put line breaks in for each of your tags and make sure that your elements don't wrap lines. As I look at your code, I see that the span tab with 'id=text18' is broken in the middle. And I see that in the XML the input_control tag for 'bindcontrolid="compUid_13"' is broken. Whenever I open the editor, I always check my line breaks for two reasons... 1) I can't read it when its all in one line like that and 2)because of the issue your describing.

As Tony says:

quote:
A quick tip, use indenting within your code. It may appear that you are being anal about neat code, but it does make a big difference in the speed at which you (and anyone coming behind you to support it!) can read and understand it.


In this case, you aren't just being Anal, you are actually making sure that the code will execute properly. Smiler


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Guru
posted Hide Post
Hi,

Thanks a lot Eric.woerle for the tips!
Once again thank you everyone for the hints and ideas and I will try to implement the same in my code.

Regards!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report 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]Weird error in HTML composer

Copyright © 1996-2020 Information Builders