I think you will find that if you change this line:
javascript Code:
object.innerHTML += '</pre><p><input type="image" src="/images/buttons/b-close.png" onclick="javascript:document.getElementById(\'' + id + '\').className = \'hiddenState\';" value="Close Window" /></p>';
to something like
javascript Code:
object.innerHTML += '</pre><p><input type="image" src="/images/buttons/b-close.png" onclick="javascript:document.getElementById(\'' + id + '\').className = \'hiddenState\'; return false;" value="Close Window" /></p>';
or
javascript Code:
object.innerHTML += '</pre><p><a onclick="javascript:document.getElementById(\'' + id + '\').className = \'hiddenState\'; return false;" style="cursor:pointer;"><img src="/images/buttons/b-close.png" /></a></p>';
it will correct your problem.
The reason that your form is posting is because you are using an INPUT tag for your image and, the default behavior of is to post the form. To prevent this from happening you simply use 'return false;' in your onclick event to prevent the post.
hth.
-Doug
__________________
===============================================
Doug Parsons
Wrox online library:
Wrox Books 24 x 7
Did someone here help you? Click

on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================