How to make javascript run on all browser?
<p>I update my question by being abit more descriptive.</p>

<pre><code>&lt;script type="text/javascript"&gt;
    function myPopup2() {
        var iMyWidth;
        var iMyHeight;

        //half the screen width minus half the new window width (plus 5 pixel borders).
        iMyWidth = (window.screen.width/2) - (75 + 10);

        //half the screen height minus half the new window height (plus title and status bars).
        iMyHeight = (window.screen.height/2) - (100 + 50);

        window.open( "xyz.php" ,Store Record" ,"status=yes,height=300,width=350,resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no");
    }
&lt;/script&gt;
</code></pre>

<p>is the javascript which does not work with IE8. when i try it with FF 3.6.16 on windows7 it behaves strangely. Sometimes it displays the code in the pop up window.</p>

<p>Thanks,</p>
