UBB.Dev
Posted By: mic_scp load a page depending on the screen - 11/15/2004 9:04 PM
hello

i want a page to be loaded deppending on the screen resolution .. if 800/600 load page 1, if 1024 load page 2

Is this possible?
If so can anyone tell me how?

thanks
Posted By: Burak Re: load a page depending on the screen - 11/17/2004 12:56 AM
Code
<html>
<head>
<title>Loading ...</title>
<script>
var x = screen.width;
var y = screen.height;
window.location.href = x >= 1024 ? "1024.html" : "800.html";
</script>
</head>
<body>
Loading...
</body>
</html>
Posted By: mic_scp Re: load a page depending on the screen - 11/17/2004 2:33 PM
tks burak
i think this is exactly what i wanted
Posted By: Ian Spence Re: load a page depending on the screen - 11/17/2004 4:32 PM
that's great, cause everyone knows no one uses 1280x1024 and 1600x1200

What about people on laptops who use something like 1400x800, and anyone else who uses either pdas or macs?

What are you doing that can't be done via a fluid layout?
Posted By: mic_scp Re: load a page depending on the screen - 11/17/2004 9:18 PM
well Ian i'm making a page with 5 frames and i was having truoble with one of the frames.

Probably there is a simple way to do it better, but i don't know how to.

The page is http://paroquiareboleira.no.sapo.pt

if you have any other sugestion.
Posted By: Gizmo Re: load a page depending on the screen - 11/18/2004 1:54 AM
why not just use 100% on the table width on the page in that frame; or 98% with align="center" so there is spacing like on the UBB
Posted By: mic_scp Re: load a page depending on the screen - 11/18/2004 2:34 PM
ok Gizzy and how do i do that ?

its a simpple page with only a bckgrd image
Posted By: Gizmo Re: load a page depending on the screen - 11/19/2004 3:19 AM
100% Table:
Code
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="100">
<tr>
<td width="100%"> </td>
</tr>
</table>
</div>
98% Table:
Code
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="98%" id="98">
<tr>
<td width="100%"> </td>
</tr>
</table>
</div>
© UBB.Developers