Can somebody please help me
|
|
I'm new with greasemonkey and am trying to do some simple greasemonkey scripting. On the site http://www.hattrick.org/Common/menu.asp
For focusing I have used the following code;
but if you take a look at the HTML source code... there is body onload event that calls some javascript that sets focus to username field. I tried to change the innerHTML as shown below;
but it didn't work..
but that didn't work ither.. I'm stuck and I need help/advice/solution;) please help me. |
|
|
document.getElementsByName('loginname')[0].value = 'login';
document.getElementsByName('password')[0].focus();
document.body.setAttribute('onload', null);
|
|
|
thank you for a simple solution.
|
|
|
You just didn't understand the difference between getElementsByTagName and getElementsByName. |
|
|
I don't agree with that.. I do understand the difference between getElementsByTagName and getElementsByName.
|
|
|
Then why did you expect |
|
|
I was writting the code here without using copy/paste from an actual script and made a mistake.
|
|
|
ha! I even corrected the mistake now ;) |
|
|
Maybe I should delete my comments then :0 |
|
|
You don't have to.. let it be written in the history :) |
|
|
hey i have some scripts for hattrick, but its been a long time i dont log in, my team is so dead i dont even wanna see it... as i may feel sad :( nice idea your script! |
|
|
My team isn't doing well either. We were 5th in our league last season. But we won't give up and neither should you ;) |
