Helpful Information
 
 
Category: JavaScript Development
How to pass dynamic data into JavaScript?

We are planning to use DHTML and JavaScript to generate the whole UI, and JSP or Java Servlet as backend to pass in dynamic data to the JavaScript, and let DHTML+JavaScript to generate the HTML page which contain UI together with data to present to the user. Could any one suggest any method for us to pass the dynamic data into JavaScript? Thanks!

With PHP you would write the variables ie:
<?php echo "var thisvar="hello" ";?> or fill the form using document.formname.valuename.value="<?php echo $var ?>">

I assume that JSP does a similar thing.

This method however needs the users UI to be refreshed which I gather from earlier questions you do not want to happen , I think then that the best bet is to use a hidden frame which alters the data in the visible frame using the second method above.

Simon

------------------
Simon Wheeler
FirePages -DHTML/PHP/MySQL










privacy (GDPR)