lbuelvas Posted January 26, 2019 Share Posted January 26, 2019 Hi, i'm trying to build an app that displays info from a database, i'm able to use ajax to get info from the client side to retrieve the data but i can't seem to find a way to change the html content so the data shows, i know i can do it via JavaScript, but i don't know how to execute JS from the server, so if anyone could help me to do so, or find a more sophisticated way to do it, i'd be thankful. (i'm trying not to use components like Unidbedit and as such by the way) Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted January 27, 2019 Share Posted January 27, 2019 Hi Please try UniSession.AddJS("....."); 1 Quote Link to comment Share on other sites More sharing options...
lbuelvas Posted January 27, 2019 Author Share Posted January 27, 2019 6 hours ago, Hayri ASLAN said: Hi Please try UniSession.AddJS("....."); Hi Hayri, it worked to execute functions defined in the HTML code indeed, thank you, and aslo to anyone who wants to execute general JS statements (not defined as custom functions) you can use yourParentComponent.yourHTMLframe.JSinterface.JScall() Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted January 28, 2019 Share Posted January 28, 2019 You can define your function with this code. I mean you can call something like that UniSession.AddJS('function myFunction(p1, p2) {'+ ' return p1 * p2; '+ '} '); UniSession.AddJS('alert(myFunction(3,5));'); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.