I have a javascript like this, used i a bookmarklet:
window.location="URL"
document.getElementById('username-id').value = 'User'
document.getElementById('pwd-id').value = 'pass'
doLogin();
The problem is that javascript stops as soon as it hits the URL.
How to make it go to a page and execute a script?
Any help would be greatly appreciated.
Unfortunately your bookmarklet will not work. Change of
window.locationresults loading of the new page – you cannot execute any Javascript on that page without having the document present first.The desired action can be achieved by browser extensions, e.g. Greasemonkey script, which execute specified Javascript on the page upon page load.