document.write() not working - alternatives?

Forum to discuss the Web client version of Servoy.

document.write() not working - alternatives?

Postby maria.kyselova » Sun Jan 24, 2016 4:20 am

Hi guys,

I am designing some html markup and it should be different depending on a variable in my html page javascript.
However, I seem to be unable to insert html code from the page javascript. I tried the code below and it works if I save it as a html page but not if I put it in a variable and assign it as a dataprovider to a html area in Servoy.

Any tips on making it work will be appreciated.
Thanks in advance.

Code: Select all
               function addElement () {
                 document.write("Dynamic Text");
                                <div>text before dynamic insert</div>
                     <div>           text after dynamic insert</div>

Sample webclient solution (not displaying the 'Dynamic Text' label) attached.

You do not have the required permissions to view the files attached to this post.
Posts: 172
Joined: Thu Aug 09, 2012 12:56 am

Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 1 guest