take a look to the next code:
<html><head>
<script language="JavaScript">
var wl,hl,sr;
var r=new Array(1024,800,640);
var p=new Array(new Array(300,200),new Array(200,100),new Array(100,50));
for(var q=0;q<r.length;q++)
{
if(screen.width==r[q])
{
sr=q;
wl=p[q][0];
hl=p[q][1];
}
}
</script></head><body><scr
alert("Here I can use the values setted up before: "+wl+" "+hl+" for the screen resolution of "+r[sr]+" width.");
</script></body></html>
now from the 'inbody-script' you can create a layer with the dimensions found after load the first js.
jbosch(vosk)
Main Topics
Browse All Topics





by: voskPosted on 2005-11-27 at 13:10:22ID: 15369713
the 'screen.width' and 'screen.height' returns the width and height of the resolution, so you can use a script to know the resolution while the loading.
jbosch(vosk)