> hai all
'hai' is just a 'kewl' way to say 'hi' or 'hello', I would recommend
either of the latter.
> I am working in a project in whihc i need to modify the dom of a
> webpage and reload the page with modified dom.
...
> please help me out how to modify it
>
[quoted text clipped - 3 lines]
> <applet id="myapplet" width="300" height="500" code ="jsobject.class"
> codebase=".">
This represent invalid HTML, an applet element is only valid when
enclosed
by a 'body' element. You should make a static HTML page of all pages
that are created using JS and check them in the HTML validator at W3C.
...
> import java.applet.*;
> import netscape.javascript.*;
[quoted text clipped - 3 lines]
> public void init()
> {
try {
> JSObject win = JSObject.getWindow(this);
> JSObject doc = (JSObject) win.getMember("document");
[quoted text clipped - 3 lines]
> document.location.href
> win.call("f", null); ;
} catch(JSException jse) {
jse.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
> }
...
> So how can i modify this error
1. Validate both the HTML this all occurs in, as well as any
HTML you intend to write using JS.
2. Catch those exceptions (as shown above, beginning example)
so that you as the programmer regain control and can then DO
something about them (exactly what to do, is the next question)
3. Post the URL of your current broken page - if it is not uploaded,
upload it. (There were a dozen more questions I could ask, but they
are all answered by the looking at your web page.)
4. Study this document carefully..
<http://java.sun.com/products/plugin/1.3/docs/jsobject.html>
HTH
Andrew T.
Roedy Green - 21 Mar 2006 23:51 GMT
>> HTML part
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
[quoted text clipped - 4 lines]
>This represent invalid HTML, an applet element is only valid when
>enclosed
Be lazy and validate your HTML and CSS before bashing your head trying
to figure out why it does not work.
See http://mindprod.com/jgloss/htmlvalidator.html
http://mindprod.com/jgloss/css.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
naveen - 22 Mar 2006 21:59 GMT
hi
Thank you for the replies, the problem still persists, and i can get
the resutls when i open the html page containting the applet. But
from the java part i am getting the exception. I am using eclispe IDE
I have adedd jaws.jar,plugin.jar and java40.jar libraries also. It was
still not identifying the path to jsobject class.
Here is the error
exception caught
netscape.javascript.JSException
at netscape.javascript.JSObject.getWindow(JSObject.java:144)
at MyApplet.init(MyApplet.java:15)
at sun.applet.AppletPanel.run(AppletPanel.java:378)
at java.lang.Thread.run(Thread.java:595)
I am not getting what exact problem is i have tried the try catch
blocks also
please help me out
thanking you
andrewthommo@gmail.com - 19 Apr 2006 01:26 GMT
> hi
> Thank you for the replies, the problem still persists,
So where's your URL? (point 3 in my first reply)
> please help me out
Please 'help yourself out' by following the instructions I give
in attempts to resolve the problem.