Page 1 of 1

servoy javascript not working properly

PostPosted: Tue Jul 28, 2015 2:28 pm
by nandlalajisingh
Hi all

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

Re: servoy javascript not working properly

PostPosted: Thu Jul 30, 2015 5:54 am
by nandlalajisingh
no one came across such problem. It would be kind if some one help me with this.

Re: servoy javascript not working properly

PostPosted: Thu Jul 30, 2015 12:33 pm
by ROCLASI
Hi Nand,

Perhaps you should create a support case for this. Since it very much looks like it's something internal.

Re: servoy javascript not working properly

PostPosted: Fri Jul 31, 2015 1:20 pm
by ROCLASI
Hi Nand,

Perhaps this thread has your solution?

Re: servoy javascript not working properly

PostPosted: Fri Jul 31, 2015 1:48 pm
by nandlalajisingh
Thanks a lot Robert,
You saved my life. that nice url value true was the problem. Now its working. Though i did create a support case. Let me close that issue.