This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Javacodes in JavaScript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Javacodes in JavaScript" Watch "Javacodes in JavaScript" New topic
Author

Javacodes in JavaScript

Seby Pappachan
Greenhorn

Joined: Nov 02, 2008
Posts: 12
Hi,

I have a a java class in which some variables are declared. And i have one more JavaScript file in which i would like to reuse these variables(declared in Java Class) instead of declaring them again in the JavaScript file. Is it possible to import java codes in JavaScript file?

Thanks
Seby
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Read this article: http://www.javaranch.com/journal/200510/Journal200510.jsp#a1

You need to write out the variables for JavaScript to use.

Eric
Seby Pappachan
Greenhorn

Joined: Nov 02, 2008
Posts: 12
Thanks Eric!
 
jQuery in Action, 2nd edition
 
subject: Javacodes in JavaScript