I'm trying to call a Javascript function on page load using invoke action in AMX page but its throwing exception. I'm using following code. My js file contains following code:
(function(){
if (!window.application) window.application = {};
DayView.gotoFirstOperation =function(){
var element =document.getElementById('box');
alert('Method exeuted');
if( 'null' != element){
element.scrollIntoView();
}
}; })();
My invoke action method I'm calling js function in the following code:
AdfmfContainerUtilities.invokeContainerJavaScriptFunction(AdfmfJavaUtilities.getFeatureName(), "DayView.gotoFirstOperation", new Object[]{});
I'm getting following exception:
invokeContainerUtilitiesMethod 'invokeContainerJavaScriptFunction' encountered an error[ERROR[oracle.adfmf.framework.exception.AdfException]-JS Response returned a nil response.].
Is there any other way I can call the js function on AMX page load?