No, that connection doesn’t seem to be relevant. It is the target="hidden_iframe1"
piece that seems to be responsible for the beneficial effect that you are after.
So, if we can take a closer look at the rest of the code for that page, we should be able to help you further.
No JavaScript is required here at all.