BHARAT GUPTA asks:
I want to be able to run JavaScript code in an HTML file using Java code. The HTML file is being downloaded by using a Java program but I cannot get to run those JavaScript codes which are generating a few more elements thereafter. I want to run the two functions: unloadHandler1(event); & unloadHandler(); using Java code.
2 Answers -
Mike
May 28, 2012I’m not exactly a programmer so I can’t really give you an experts answer but to give you something:
JavaScript is a client side scripting language.
You said the HTML file is downloaded by an Java Application therefor it is up to this application to properly execute the JavaScript within.
Being part of the HTML file I can only assume that the Java application needs to run a full browser engine e.g. Webkit in order to properly process the HTML and JavaScript.
Oron
May 28, 2012Java, or JavaScript? They’re not the same language, and are embedded differently!