This is the same question as THIS ONE, I can't answer that anymore, so I'm re-posting it with my account. Sorry for the mess.
and, while it works on a local page even when using onload, it doesn't work when I use it in my script.
Probably I'm missing something when transferring the code from the body of an html page to a Greasemonkey script.
I hope this time the question is more clear, excuse me for any misunderstanding, but I'm still a beginner with JS.
Solved it like this:
Thanks everyone for answering anyway.
I can see the alert box..
Will this work for your scenario?