How do I call a javascript function on AMX page load?
I am trying to call a java script function on page load using the invoke action on the AMX page, but this is an exception to throw. I am using the following code. My js file contains the 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 in invoke action method I am calling the js function in the following code.
AdfmfContainerUtilities.invokeContainerJavaScriptFunction(AdfmfJavaUtilities.getFeatureName(), "DayView.gotoFirstOperation", new Object[]{});
I am getting the 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?
source to share