getting document base using JSObject
Posted on 2001-06-06
from my applet, I need to get the url of the html document using JSObject.
(I cannot use applet.getDocumentBase(), because it can be fooled with an html BASE tag).
for explorer I have a working solution, but in netscape, the following code does not work, href turns out to be null.
JSObject window = getWindow(applet);
JSObject location = (JSObject)window.getMember("location");
Object href = location.getMember("href");