Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet to html data format question

 
Joe Crew
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I was wondering if I could get some opinions on how I should do something before I try. Let me give some background. I've created a client/server applet to be used from a web page. A user will bring up a web page and type in a request for data. Using Live Connect, the request is sent to the Java Client. The Client passes the request to the server through a socket. The server makes a request to the database and returns the results back to the Client. I've ALREADY created ALL of this code and it works GREAT So here is my issue I am asking about.
Right now my data is sitting in the client getting ready to pass it back to the html page. My question is, how should I use my Java data to update the javascript variables. My client is holding a bunch of values. These values have to be used to update javascript (or DOM if you prefer) variables contained in the html. My data in the Java Client is contained in an array (coul easily make it a string of data if that would help). But this array knows nothing about javascript variables. How can I pass this array to update the javascript variables. For example, if I pass this array to javascript, the javascript will just see this array as an array and has no idea which array element to assign to each variable.
It would be nice if Javascript contained an enumerated type, because then each array element could correspond to each enum.
I'm 95% completed with this project. I just need to do the final step of updating my data in my html page. Any ideas would be appreciated and I hope this is the right forum for this question.
Joe Crew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic