Thanks for the answer and I apologize about the messy code.
Ok. First of all the Javascript is executed when the user click on a "Confirm" button, so the form already exist at this point.
And yes, i disabled the popup blocking at Firefox configurations.
Well, i'm not highly familiar with the...