Javascript - wait until page is loaded to proceed to next action

Soldato
Joined
2 May 2004
Posts
19,950
Hi,

I've been using the FormSaver plug-in recently for Mozilla.

Basically, when you're on the page you click bookmark form, then when you go back to that page you click the bookmark you run that bookmark and it fills out the form using some JavaScript, pretty simple.

At the beginning of the bookmark I have added window.location = "http://www.website.com/form/"; so the bookmark takes me to the website as well as fills it out.

The problem with that is the rest of the JavaScript (to fill the form) gets run before the page has a chance to load.

So, is there any way I can make the JavaScript stop until the page is loaded?

Thanks,
Craig.
 
From a bookmark.

I load the webpage with the form on it, I then click the boomark which contains some JavaScript in the URL and it fills out the form.

Thanks,
Craig.
 
Back
Top Bottom