I am looking to write my first Java applet (with a difference). I want to write an applet that manipulates the DOM of the page in which the applet is placed. A suitable example would show how:
- an element can be retrieved from the DOM (by name, id or some other CSS property)
- Insertion/deletion of an element in to the DOM (before/after) a given DOM element
the innerHTML of a DOM element can be changed
Call a javascript function and pass data from the Java applet, to the javascript function
I have searched the internet - but so far, have not come accross any such example. Is anyone aware of such an example?. If yes, please post a link, or a snippet that shows how to achieve the functionality listed above, if possible.