views:

45

answers:

2

Hi All,

 <div>
    <span id="NewWindowDetectionStarter1">
    <a id="ctl03" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl03&quot;, &quot;&quot;, false, &quot;&quot;, &quot;Home.aspx&quot;, false, true))"></a>
    <a id="ctl04" href="javascript:__doPostBack('ctl04','')"></a>
</span>
</div>

   <script type="text/javascript">

 if (window.name == 'default') {
        window.name = 'a03d01c6c88549c6a7e05c922961271e';
        window.document.getElementById('ctl03').click();
    }
    else if (window.name == '') {
        window.name = 'default';
        window.document.getElementById('ctl04').click();
     }
    else if (window.name == 'invalidAccess') {
        if ('FALSE' == 'TRUE')
        {
         window.name='';
        window.document.getElementById('ctl04').click();
        }
        else
        {
            window.open('MsgPage_NewWindow.aspx','_self');
        }
    }
    else {
        window.name = 'invalidAccess';
        window.document.getElementById('ctl04').click();
    }
</script>

The above script is emitted on the page by a server control is a WebPage... There is no other control in the page apart from the page... Internet Explorer redirects it to the page "Home.aspx", but Firefox just stays in the same page... Noteven it shows any error.

Could you please help. I also would like to know the reason why so, as I have to make the entire web application work in FF.

+4  A: 

You're using the proprietary IE-only click method to redirect.

You should write location.href = "http://url"; instead; that will work in every browser.

SLaks
Thank you very much...
The King
+1  A: 

Are you looking under Tools->Error Console? If you do you will see something like "click is not a function", try simply setting .location.

Alex K.