i am trying out simple servoy javascript integration but its not working fine.
i have a html area in form. And i am calling that form in other form's tab.
I giving anchor tag in html area,
- Code: Select all
var items =['Create_BezMedCon','Update_BezMedCon'];
menu_item = '<html><body><br><br>' ;
for(var i in items) {
menu_item += '<h2><a id ="' + items[i] + '" onclick="runMenuHandler(id)" href="#">'+ items[i] + '</a></h2><br>' ;
}
menu_item += '<script type="text/javascript" charset="utf-8">'+
'function runMenuHandler(eventName){'+
plugins.WebClientUtils.generateCallbackScript(runMenuHandlerServoy, ['eventName'])+
'}' +
'</script></body></html>';
}
Again i am defining callback method
- Code: Select all
function runMenuHandlerServoy(eventName) {
application.out("Hello...");
forms.tpp_main_support.elements.tab_right_window.tabIndex = 2;
}
The problem is in browser on clicking on the link. Its showing small loading.... image on right top and then after the application is hanged and nothing happening...
Though its printing Hello... in console.
After refresh its loading the other tab.
I looked in browser console and got following message
404 error -http://localhost:8080/servoy-webclient/application/solution/resources/wicketevent/wicket-event.js not found
But wicket-event.js is some servoy internal js file.
BTW i am using servoy 7.4.4
And also updated my webclient plugin to 1.4
Thanks
Nand