File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes assigning java variable in javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "assigning java variable in javascript" Watch "assigning java variable in javascript" New topic
Author

assigning java variable in javascript

prasanna mr
Greenhorn

Joined: Jan 24, 2008
Posts: 4
how can we assign java variable in javascript?Is there any example?
it's urgent..
Lave Kulshreshtha
Ranch Hand

Joined: Oct 21, 2007
Posts: 106
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..


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, ITIL V3 Foundation Certification
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60800
    
  65

"prasanna mr", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60800
    
  65

Originally posted by prasanna mr:
it's urgent..

Please read this for information on why this isn;t a good idea.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: assigning java variable in javascript
 
Similar Threads
How to assign a javascript variable to java varisble?
Access java script variable from a java file
Converting javaScript variable to java
assign return value of function from javascript to variable in jsp
Need Some Help Here