OnLoad kicking off process  
Author Message
Matt





PostPosted: 2004-2-25 23:54:00 Top

java-programmer, OnLoad kicking off process Good Morning,

A friend of mine asked me a question the other day and I am fairly stumped.
Is there a way to use the onLoad function to kick off a process on the
server while the page is being painted? Want to send a message to a servlet
and then send the form to the servlet once the user has filled in the
values.

I did some webapp stuff a while back and we used the onload function to help
the page paint a little easier, I wondered if we could use it to send a
message, or if there was something in JSP or HTML that I overlooked.

Thanks,
M@

 
Michael Borgwardt





PostPosted: 2004-2-26 0:09:00 Top

java-programmer >> OnLoad kicking off process Matt wrote:

> Good Morning,
>
> A friend of mine asked me a question the other day and I am fairly stumped.
> Is there a way to use the onLoad function to kick off a process on the
> server while the page is being painted?

OnLoad is called when the page has finished loading, usually that concides
with finishing the painting since modern browsers start painting the page
before it has finished loading.

As for "kicking off" a server process, that should be possible by creating
an Image object and assigning the servlet's URL to its src property.
The same effect would be achieved by having a HTML image tag with width
and height of 0 somewhere at the bottom of the page.

 
Andrew Thompson





PostPosted: 2004-2-26 0:28:00 Top

java-programmer >> OnLoad kicking off process "Michael Borgwardt"...
> Matt wrote:
...
> > A friend of mine asked me a question the other day and I am fairly
stumped.
> > Is there a way to use the onLoad function to kick off a process on the
> > server while the page is being painted?
>
> OnLoad is called when the page has finished loading, usually that concides
> with finishing the painting since modern browsers start painting the page
> before it has finished loading.

Are you speaking Java or JavaScript* Michael?

I am familiar with the JS onLoad() function,
but have never heard of an equivalent for
applets..

(In fact, I noted recently that the JS
onLoad() function was called prior to
Applets finishing their init(), which was
most unhelpful to me for the problem
I was working on)

* And to the OP, if this is JS..
http://groups.google.com/groups?group=comp.lang.javascript