Note that there are some explanatory texts on larger screens.

plurals
  1. POIE Doesn't run remote JS properly but local runs fine
    primarykey
    data
    text
    <p>My page works in every browser except in IE 10. When I run this page locally in IE 10 there seems to be no problem whatsoever, only when I open the page remotely with IE 10. </p> <p>The JavaScript is supposed to measure the div with main text and set the height and width of the div's that are off-screen. This is done wrong by IE 10. The width of these div's has to be set because otherwise the will not animate in properly when an item from the menu is clicked.</p> <p>I did a check on deprecated functions but found none. I checked the syntax and nothing wrong there. (as far as i can see) The console in IE does not report any errors.</p> <p>Anyone any idea as for why locally it works fine in every browser, but remotely the only browser that displays it faulty is IE?</p> <p>EDIT:</p> <p>I have removed the function brackets at init so the DOM can initiate, although this did not fix the problem.</p> <p>script (embedded in the head of the page):</p> <pre><code>&lt;script src="scripts/jquery-1.10.1.min.js"&gt;&lt;/script&gt; &lt;script&gt; var mainTextDiv = null; var animate; var acc = 0; var currentTab = "home"; var nextTab; var working = 0; var bar = 600; var divW; function init(){ onWC(currentTab); document.getElementById(currentTab).style.width = 'auto'; divW = document.getElementById(currentTab).offsetWidth; document.getElementById("home").style.width = divW + "px"; document.getElementById("profile").style.width = divW + "px"; document.getElementById("news").style.width = divW + "px"; document.getElementById("forums").style.width = divW + "px"; document.getElementById("webshop").style.width = divW + "px"; document.getElementById("status").style.width = divW + "px"; } function onWC(tab){ var divh = document.getElementById(tab).offsetHeight; document.getElementById('tabcontainer').style.height = ( divh + 50 ) + "px"; } function moveDiv(tabName){ if (currentTab == tabName){ return; } if (working == 1){ return; } working = 1; nextTab = tabName; removeDiv(); } function removeDiv(){ mainTextDiv = document.getElementById(currentTab); mainTextDiv.style.left = parseInt(mainTextDiv.style.left) + (0.5+acc) + "px"; if (parseInt(mainTextDiv.style.left) &gt; 2000){ mainTextDiv.style.left = 2000 + "px"; onWC(nextTab); getDiv(); return; } acc += 0.15; animate = setTimeout(removeDiv,10); } function getDiv(){ mainTextDiv = document.getElementById(nextTab); mainTextDiv.style.left = parseInt(mainTextDiv.style.left) - (0.5+acc) + "px"; if (parseInt(mainTextDiv.style.left) &lt;= 0){ mainTextDiv.style.left = 0 + "px"; currentTab = nextTab; working = 0; return; } acc -= 0.15; animate = setTimeout(getDiv,15); } window.onload = init; window.onresize = init; $(function() { $("#menu ul li a").hover( function(){ $(this).css("background-color", "#525252"); $(this).css("color", "#FFF"); }, function() { $(this).css("background-color", "#FFF"); $(this).css("color", "#525252"); } ); }); &lt;/script&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload