• Post Reply Bookmark Topic Watch Topic
  • New Topic

server side and client side variables

 
Nathan Astle
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a server side variable called SV in JSP and client side varible(Java Script) CV. I want to assign the value of SV to CV and display it in a page.

Could anyone tell me how to assign SV to CV ?

thnx
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can assign the value of the server side variable to the client side variable directly while you are rendering the page.

You can't update the client side variable directly after the page has been sent to the client.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"rsvjava rsvjava",

We're pleased to have you here with us on the Ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!