dcsimg
access to html from applets
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rainer_Noeth
Posted On:   Wednesday, May 11, 2005 10:31 AM

hallo (and sorry for my bad english), i need access from applets to html-tags. i found the following example, but it doesnt work: DOMService service = null; try { service = DOMService.getService(this); String title = (String)service.invokeAndWait(new DOMAction() { public Object run(DOMAccessor accessor) { HTMLDocument doc = (HTMLDocument) accessor.getDocument(this); return doc.getTitle(); } }); } catch (Exception......) --> "this" is my Applet-Class in which i wrote this code i always get the same exceptions:    More>>
hallo (and sorry for my bad english),

i need access from applets to html-tags. i found the following example, but it doesnt work:



DOMService service = null;

try {

service = DOMService.getService(this);

String title = (String)service.invokeAndWait(new
DOMAction() {

public Object run(DOMAccessor accessor)
{

HTMLDocument doc = (HTMLDocument)
accessor.getDocument(this);

return doc.getTitle();

}

});

} catch (Exception......)



--> "this" is my Applet-Class in which i wrote this code

i always get the same exceptions:



com.sun.java.browser.dom.DOMUnsupportedException


at sun.plugin.dom.DOMServiceProvider.getDocument(Unknown Source)


at sun.plugin.dom.DOMAccessor.getDocument(Unknown Source)


at MyApplet$1.run(MyApplet.java:43)


at sun.plugin.dom.DOMService.invokeAndWait(Unknown Source)


at MyApplet.start(MyApplet.java:38)


at sun.applet.AppletPanel.run(Unknown Source)


at java.lang.Thread.run(Unknown Source)


do there anybody know the problem or can tell me what "Unknown Source" means at this example?    <<Less
About | Sitemap | Contact