Reputation: 171
I'd like to modify the value of a hidden <input>
tag in my applet. But I don't know how to manipulate DOM elements.
I've found the article "Manipulating DOM of Applet's Web Page" in official Java SE tutorial. But when I try the following code :
Class c = Class.forName("com.sun.java.browser.plugin2.DOM");
I get a ClassNotFoundException
.
Is the Java Common DOM API is installed with JDK ? It only supports special browsers ? Or we should use an other API ?
I'm using JDK 7, browser Google Chrome and Eclipse for programming.
Best regards
Upvotes: 1
Views: 611
Reputation: 168825
You are better off abstracting the DOM manipulation out to JS, since there are JS APIs that take cross-browser differences into account. Then have the applet call the generic JS methods.
Upvotes: 1