我想在頁面加載時使用調用動作在AMX頁面中調用Java腳本函數,但它引發異常。 我正在使用以下代碼。 我的js文件包含下面的代碼下面的代碼如何在AMX頁面加載時調用JavaScript函數?
(function(){
if (!window.application) window.application = {};
DayView.gotoFirstOperation =function(){
var element =document.getElementById('box');
alert('Method exeuted');
if('null' != element){
element.scrollIntoView();
}
}; })();
我在調用操作方法我打電話js函數。
AdfmfContainerUtilities.invokeContainerJavaScriptFunction(AdfmfJavaUtilities.getFeatureName(), "DayView.gotoFirstOperation", new Object[]{});
我得到以下異常invokeContainerUtilitiesMethod 'invokeContainerJavaScriptFunction' encountered an error[ERROR[oracle.adfmf.framework.exception.AdfException]-JS Response returned a nil response.].
有沒有其他辦法,我可以呼籲AMX頁面加載JS的功能?