Javascripts i forskellige browsere
Jeg kan konstatere at to javascripts ikke fungere på forskellige maskiner, der kører med Internet Explorer 5.0. Det drejer sig om script'ene:1)
<script type="text/javascript">
function oploesning()
{
x = screen.width;
y = screen.height;
if(x >= 1280 && y>=1024) location.href="index_1280.htm";
else if(x >= 1024 && y>=768) location.href = "index_1024.htm";
else if (x >= 800 && y >= 600) location.href="index_800.htm";
else location.href = "index_800.htm";}
oploesning();
</script>
2)
<script type="text/javascript">
var param= Array[2];
adres = location.href; // Hent index-filens adresse
param = adres.split("?"); // Klip parameter fra, skal sendes videre til ny index-fil
parameter="?" +param[1];
if (param[1]== undefined) parameter="" // ingen underside requestet
function oploesning()
{
x = screen.width;
y = screen.height;
if(x >= 1280 && y>=1024) location.href="index_1280.htm"+parameter
else if(x >= 1024 && y>=768) location.href = "index_1024.htm"+parameter;
else if (x >= 800 && y >= 600) location.href="index_800.htm"+parameter;
else location.href = "index_800.htm"+parameter;
}
oploesning();
</script>
3)
// Opret rammesæt med Javascipt
html="<FRAMESET frameSpacing=0 rows=82,* frameBorder=0>"
html += "<FRAME name=banner src='start/top/top_1024.htm' noResize scrolling=no >"
html += " <FRAMESET cols=110,*>"
html += " <FRAME name=indhold src='start/menu/menu_1024.htm' scrolling=no >"
html += " <FRAME name=hovedramme src=' "+parameter+" ' target='_self' >";
html += " </FRAMESET>"
html+= "</FRAMESET>"
//alert(html);
document.write(html);
//--></SCRIPT>
Kan det virkeligt passe, at IE 5 ikke kan håndtere disse, eller ligger fejlen et andet sted?
