Code that automatically go to login page and click login:

javascript: window.location = 'https://1.1.1.1/login.HTML';
while (true) {
    if (document.readyState == "complete") {
        window.onload(document.forms[0].Submit.click());
        break;
    }
}

Code passed through jsbeautifier; original does not have line breaks

I paste this script on urlbar but its not working (it go to https://1.1.1.1/login.HTML but not login) but if I'm on https://1.1.1.1/login.HTML and paste this script it works. I don't understand why it does not work.

link|improve this question
It might look if it comes from another page. – Alex Jul 9 '11 at 18:02
On which browser are you doing this? while (true) is effectively an infinite loop and should lock up the browser – Yi Jiang Jul 9 '11 at 18:19
@Yi Jiang im use firefox and remember id, pass for login – 1eftHer0 Jul 9 '11 at 18:37
feedback

1 Answer

javascript: URLs are run in the context of the current page.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.