• Post Reply Bookmark Topic Watch Topic
  • New Topic

How javascript variable assigned to JSP variable  RSS feed

 
Nilesh Chokhadia
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,
Can any one show me a code that assigns javascript variable with jsp variable.
I need this code for my form validation which checks input value of text field onBlur with database value.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The important thing to keep in mind is that at the point when the JSP code is being run to generate the page, any JavaScript in the page is static text, just like HTML.
You can do it if you put something like this in your page:

Does that make sense?
 
Nilesh Chokhadia
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much I got my doubt clear
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!