Javascript to fill in textbox


im having a very annoying problem lately, and i was hoping you javascript guru’s could fix it

Our school’s online educational platform has changed, but in Google Chrome the login page no longer remembers the login info. Thats very annoying since i have no numpad on my laptop and the login is al about numbers.

I have tried making a little javascript to enter in the address bar, that goes to the website, and fills in username textbox, but it doesnt work… here it is:


the url is

I hope you understand what i mean, and thanks in advance

I am really confused what you mean but if you first load the page then enter the following line in the url:

javascript: document.getElementById('username').value='345329458960';return false;

Then you will have the numbers in the text box.

omg that works indeed!
i add the first part of the code, because i want the script to load the page itself AND extract the code in just 1 click, but that still doesnt work…

But hey, why does there have to be a ‘return false’ in the back?

tnx alot!

Did you try yourself without return false at the end of line? Try once and see what it happens if you don’t write it.

hey yes yes yes that happened to me when trying and i didnt understand. Ok nice, now the only thing i want more is to add this script in a bookmark on my bookmarkbar, so that the bookmark opens the webpage AND executes the script. I have no idea how to do that…

thats why i added the void(location.href=‘’); in the first place…

the situation now is already alot better:

I have to bookmarks in my bookmarks bar:
the first one brings me to the login page:

the second one fills in the two textboxes:

javascript: document.getElementById('username').value='23434539857';document.getElementById('password').value='XXXXXXX';return false;

My goal is to combine these actions in 1 single bookmark