• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javacodes in JavaScript

 
Seby Pappachan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Eric!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic