1

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.

3
  • It might look if it comes from another page.
    – Alex
    Jul 9, 2011 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, 2011 at 18:19
  • @Yi Jiang im use firefox and remember id, pass for login
    – fronthem
    Jul 9, 2011 at 18:37

1 Answer 1

4

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .