• Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing servlet variable through JavaScript  RSS feed

 
Nidhi Singhal
Ranch Hand
Posts: 89
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Please tell me that how to access a servlet variable in a javascript function?

Thanks..

Nidhi
 
James Clinton
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since JavaScript operates on the user browser, you have to write it into the HTML page you send to the browser. I suggest you start with a plain HTML page (NOT servlet generated) with embedded JavaScript to test.
When that prototype works, make your servlet generate that HTML.
Bill
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!