• Post Reply Bookmark Topic Watch Topic
  • New Topic

assigning java variable in javascript

 
prasanna mr
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can we assign java variable in javascript?Is there any example?
it's urgent..
 
Lave Kulshreshtha
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to assign a java variable to javascript variable. javascript method should be present in a JSP file, following is the example

<script>
var temp = <%=javaVariable%>
</script>

-Lave

Originally posted by prasanna mr:
how can we assign java variable in javascript?Is there any example?
it's urgent..
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65518
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"prasanna mr", please check your private messages for an important administrative matter.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65518
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by prasanna mr:
it's urgent..

Please read this for information on why this isn;t a good idea.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!