Focal Point
[RESOLVED]App Studio 8009 HTML Incorrect Function error

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7737093286

May 16, 2016, 03:06 PM
Michele Brooks
[RESOLVED]App Studio 8009 HTML Incorrect Function error
I ran a launch page from App Studio that was created in Dev Studio and received a script error message that said Incorrect Function. The launch page does have embedded JavaScript coded in it. Does anyone know what's causing this error message? Thanks.

This message has been edited. Last edited by: Michele Brooks,


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
May 18, 2016, 04:00 PM
Tamra
Michele,

If you have Dev Studio open and App Studio open at the same time that causes
issues.

Can you run the following prior to either running DevStudio or AppStudio

thisfoci.bat - this registers the dll for that version of WebFOCUS

located under either
ibi\DevStduio8x\bin or ibi\AppStudio8x\bin.

You would have to right click on thisfoci.bat and click on Run As Administrator


This might help.

Thank you for participating in the Focal Point Forum.

Kindest regards,
Tamra Colangelo
Focal Point Moderator - Information Builders Inc.
* Summit 2016 – June 13-17 in Reno, Nevada  - http://www.informationbuilders.com/events/summit



You would have to right click on thisfoci.bat and click on Run As Administrator
This registers the dll's.


WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5
May 19, 2016, 12:53 PM
Michele Brooks
Tamra, I am not running Dev Studio and App Studio at the same time. I pulled up an existing html page in App Studio that was created in Dev Studio. I wanted to see if it would run. I was able to tweak the list boxes in App Studio, but now the html page won't run because I'm getting a Script Error on the JavaScript page. Thanks.


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
May 19, 2016, 01:09 PM
Squatch
Can you post the embedded JavaScript code?


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
May 20, 2016, 12:30 PM
Michele Brooks
The error message says: Expected ')'

  
//Begin function window_onload
function window_onload() {


//*UpdateData();


// TODO: Add your event handler code here

}
//End function window_onload






//Begin function form1Submit_onclick
function form1Submit_onclick(event) {




}
//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(event) {




   IbComposer_disableHtmlElement('checkbox2_0', IbComposer_isSelected('checkbox1_0');
   IbComposer_disableHtmlElement('checkbox3_0', IbComposer_isSelected('checkbox1_0');
   IbComposer_disableHtmlElement('calendar1', IbComposer_isSelected('checkbox1_0');
   IbComposer_disableHtmlElement('calendar2', IbComposer_isSelected('checkbox1_0');
   IbComposer_disableHtmlElement('listbox5', IbComposer_isSelected('checkbox1_0');
   IbComposer_disableHtmlElement('listbox6', IbComposer_isSelected('checkbox1_0');
   IbComposer_disableHtmlElement('listbox7', IbComposer_isSelected('checkbox1_0');


}
//*
//****************************************************************************************************************************************
//End function checkbox1_onclick




//Begin function checkbox2_onclick
//****************************************************************************************************************************************
//* If Quarter/Year is checked, enable the Quarter and Year listbox and disable all other date selection options.
//*
function checkbox2_onclick(event) {




   IbComposer_disableHtmlElement('checkbox1_0', IbComposer_isSelected('checkbox2_0');
   IbComposer_disableHtmlElement('checkbox3_0', IbComposer_isSelected('checkbox2_0');
   IbComposer_disableHtmlElement('calendar1', IbComposer_isSelected('checkbox2_0');
   IbComposer_disableHtmlElement('calendar2', IbComposer_isSelected('checkbox2_0');
   IbComposer_disableHtmlElement('listbox5', IbComposer_isSelected('checkbox2_0');
   IbComposer_disableHtmlElement('listbox6', IbComposer_isSelected('checkbox2_0');
   IbComposer_disableHtmlElement('listbox7', IbComposer_isSelected('checkbox2_0');




}
//*
//****************************************************************************************************************************************
//End function checkbox2_onclick












//Begin function checkbox3_onclick
//****************************************************************************************************************************************
//* If Year is checked, enable the Year listbox and disable all other date selection options.
//*
function checkbox3_onclick(event) {




   IbComposer_disableHtmlElement('checkbox1_0', IbComposer_isSelected('checkbox3_0');
   IbComposer_disableHtmlElement('checkbox2_0', IbComposer_isSelected('checkbox3_0');
   IbComposer_disableHtmlElement('calendar1', IbComposer_isSelected('checkbox3_0');
   IbComposer_disableHtmlElement('calendar2', IbComposer_isSelected('checkbox3_0');
   IbComposer_disableHtmlElement('listbox5', IbComposer_isSelected('checkbox3_0');
   IbComposer_disableHtmlElement('listbox6', IbComposer_isSelected('checkbox3_0');
   IbComposer_disableHtmlElement('listbox7', IbComposer_isSelected('checkbox3_0');


}
//*
//****************************************************************************************************************************************
//End function checkbox3_onclick

























This message has been edited. Last edited by: Michele Brooks,


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
May 20, 2016, 01:55 PM
MartinY
quote:
IbComposer_disableHtmlElement('checkbox2_0', IbComposer_isSelected('checkbox1_0');


Look at all your lines and check parentheses balance, they don't


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
May 20, 2016, 03:35 PM
Michele Brooks
I changed my javascript as follows. I'm no longer getting an error message. When I click Run the html page just runs.

  
if(typeof(bRuntime) != 'undefined') {
// TODO: Add your inline runtime code here


}
//Begin function window_onload
function window_onload() {


IbComposer_onInitialUpdate;


// 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 form1Submit_onclick
function form1Submit_onclick(event) {




}
//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(event) {
   IbComposer_showHtmlElement('form1',IbComposer_isSelected('checkbox1'));
   IbComposer_enableHtmlElement('checkbox2_0', false, IbComposer_isSelected('checkbox1_0'));
   IbComposer_enableHtmlElement('checkbox3_0', false, IbComposer_isSelected('checkbox1_0'));
   IbComposer_enableHtmlElement('calendar1', false, IbComposer_isSelected('checkbox1_0')); 
   IbComposer_enableHtmlElement('calendar2', false, IbComposer_isSelected('checkbox1_0'));
   IbComposer_enableHtmlElement('listbox5', false, IbComposer_isSelected('checkbox1_0'));
   IbComposer_enableHtmlElement('listbox6', false, IbComposer_isSelected('checkbox1_0'));
   IbComposer_enableHtmlElement('listbox7', false, IbComposer_isSelected('checkbox1_0'));


}
//*
//****************************************************************************************************************************************
//End function checkbox1_onclick


//Begin function checkbox2_onclick
//****************************************************************************************************************************************
//* If Quarter/Year is checked, enable the Quarter and Year listbox and disable all other date selection options.
//*
function checkbox2_onclick(event) {
 
 
   IbComposer_showHtmlElement('form1',IbComposer_isSelected('checkbox2'));
   IbComposer_enableHtmlElement('checkbox1_0', false, IbComposer_isSelected('checkbox2_0'));
   IbComposer_enableHtmlElement('checkbox3_0', false, IbComposer_isSelected('checkbox2_0'));
   IbComposer_enableHtmlElement('calendar1', false, IbComposer_isSelected('checkbox2_0')); 
   IbComposer_enableHtmlElement('calendar2', false, IbComposer_isSelected('checkbox2_0'));
   IbComposer_enableHtmlElement('listbox5', false, IbComposer_isSelected('checkbox2_0'));
   IbComposer_enableHtmlElement('listbox6', false, IbComposer_isSelected('checkbox2_0'));
   IbComposer_enableHtmlElement('listbox7', false, IbComposer_isSelected('checkbox2_0'));
 
}
//*
//****************************************************************************************************************************************
//End function checkbox2_onclick


//Begin function checkbox3_onclick
//****************************************************************************************************************************************
//* If Year is checked, enable the Year listbox and disable all other date selection options.
//*
function checkbox3_onclick(event) {
   
IbComposer_showHtmlElement('form1',IbComposer_isSelected('checkbox3'));
   IbComposer_enableHtmlElement('checkbox1_0', false, IbComposer_isSelected('checkbox3_0'));
   IbComposer_enableHtmlElement('checkbox2_0', false, IbComposer_isSelected('checkbox3_0'));
   IbComposer_enableHtmlElement('calendar1', false, IbComposer_isSelected('checkbox3_0')); 
   IbComposer_enableHtmlElement('calendar2', false, IbComposer_isSelected('checkbox3_0'));
   IbComposer_enableHtmlElement('listbox5', false, IbComposer_isSelected('checkbox3_0'));
   IbComposer_enableHtmlElement('listbox6', false, IbComposer_isSelected('checkbox3_0'));
   IbComposer_enableHtmlElement('listbox7', false, IbComposer_isSelected('checkbox3_0'));
 
}
//*
//****************************************************************************************************************************************
//End function checkbox3_onclick














IbComposer_ResetDownChainControlsIbComposer_enableHtmlElementIbComposer_executeIbComposer_getAllAmpersValuesIbComposer_getComponentByIdIbComposer_getCurrentSelectionIbComposer_getCurrentSelectionExIbComposer_getMapObjectIbComposer_getMarkersIbComposer_isSelectedIbComposer_onInitialUpdateIbComposer_populateDynamicCtrlIbComposer_runAnimationIbComposer_selectTabIbComposer_selectTemplateTabIbComposer_setCurrentSelectionIbComposer_setGlobalDefaultVariableValueIbComposer_showHtmlElementIbComposer_triggerExecutionaddAutocompleteOptionaddAutocompleteOptionsaddEventListeneralertanimationStartTimeapplicationCacheatobblurbtoacancelAnimationFramecaptureEventsclearImmediateclearIntervalclearTimeoutclientInformationclipboardDatacloseclosedconfirmconsoleconstructordefaultStatusdevicePixelRatiodispatchEventdoNotTrackdocumenteventexternalfocusframeElementframesgetComputedStylegetSelectionhistoryindexedDBinnerHeightinnerWidthitemlengthlocalStoragelocationmatchMediamaxConnectionsPerServermoveBymoveTomsAnimationStartTimemsCancelRequestAnimationFramemsClearImmediatemsCryptomsIndexedDBmsIsStaticHTMLmsMatchMediamsRequestAnimationFramemsSetImmediatemsWriteProfilerMarknamenavigatenavigatoroffscreenBufferingonabortonafterprintonbeforeprintonbeforeunloadonbluroncanplayoncanplaythroughonchangeonclickoncontextmenuondblclickondragondragendondragenterondragleaveondragoverondragstartondropondurationchangeonemptiedonendedonerroronfocusonfocusinonfocusoutonhashchangeonhelponinputonkeydownonkeypressonkeyuponloadonloadeddataonloadedmetadataonloadstartonmessageonmousedownonmouseenteronmouseleaveonmousemoveonmouseoutonmouseoveronmouseuponmousewheelonmsgesturechangeonmsgesturedoubletaponmsgestureendonmsgestureholdonmsgesturestartonmsgesturetaponmsinertiastartonmspointercancelonmspointerdownonmspointerenteronmspointerleaveonmspointermoveonmspointeroutonmspointeroveronmspointeruponofflineononlineonpagehideonpageshowonpauseonplayonplayingonpointercancelonpointerdownonpointerenteronpointerleaveonpointermoveonpointeroutonpointeroveronpointeruponpopstateonprogressonratechangeonreadystatechangeonresetonresizeonscrollonseekedonseekingonselectonstalledonstorageonsubmitonsuspendontimeupdateonunloadonvolumechangeonwaitingopenopenerouterHeightouterWidthpageXOffsetpageYOffsetparentperformancepostMessageprintpromptreleaseEventsremoveEventListenerrequestAnimationFrameresizeByresizeToscreenscreenLeftscreenTopscreenXscreenYscrollscrollByscrollToselfsessionStoragesetImmediatesetIntervalsetTimeoutshowHelpshowModalDialogshowModelessDialogstatusstyleMediatoStaticHTMLtoStringtopwindow






WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
May 25, 2016, 09:11 AM
Michele Brooks
This issue is resolved. The problem turned out to be one of the list boxes that was created in Developer Studio. It is a Static list box that contains 4 values that represent the quarters in a year (01, 02, 03, and 04). When I opened the html page in App Studio, the values that were entered in Developer Studio were still there so I didn't bother changing anything. Come to find out, I had to delete those values and add them in again in App Studio. Doing this eliminated the Script Error. Thanks for the suggestions offered.


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output