Another hint - I've run into the same problem, where I was including a piece of javascript from PHP.
In IE5 and 5.5 it worked like a charm, and in NS4.7 is returned a broken image (the javascript in turn passes a number of variables to another script, that writes to my database.
If I commented out the Javascript using
<!--
[Here goes the javascript-code]
-->
It doesn't work...
If I used the following way to comment out the Javascript, it does work...
<!--
[Here goes the javascript-code]
//-->
I'm not sure that your problem will be solved by this, but let hope it does 🙂