OnLoad kicking off process

M

Matt

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@
 
M

Michael Borgwardt

Matt said:
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.
 
A

Andrew Thompson

"Michael Borgwardt"...
Matt wrote: ....

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top