1

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

Allopopo
  • 171
  • 1
  • 9

1 Answers1

1

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.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
  • You mean create a javascript function using a cross-browser framework to manipulate DOM, like jQuery. And my Applet only needs to call the javascript function ? – Allopopo Jan 10 '12 at 17:14