I (badly) need a javascript that detects the screen resolution (800*600 or 1024*768) and after a specified amount of time redirects the user to one of two pages (i have a welcome site and i want the users to be redirected to one of two sites after 5 seconds). I would really apreciate if someone could mail me a script that can do that.
<script type="text/javascript"> if (screen.width <= 800) // if less than or equal to 800x600 { setTimeout("window.location.replace("800.htm")",5000); } else //everything else { setTimeout("window.location.replace("1024.htm")",5000); } </script>
@CharlesJan 20.2003 — #[font=georgia]Pyro made two mistakes. The first, understandable one was to forget to use two different types of quote mark. The second, inexcusable one was to neglect the fact that one in ten users do not use JavaScript. Put this script in your document's body where you want the "Continue" link to appear for those users.
[/font][font=monospace]
<script type="text/javascript">
if (screen.width <= 800) // if less than or equal to 800x600
@pyroJan 20.2003 — #First of all, thanks for noticing my quotes error... ?
[i]Origianlly posted by Charles[/i]
[B]The second, inexcusable one was to neglect the fact that one in ten users do not use JavaScript.[/B][/QUOTE]This wasn't meant to be a full page. He asked for a script to redirect users based on resolution, so I gave it to him. I certainly wouldn't consider [B]that[/B] an error... ?
@CharlesJan 20.2003 — #[i]Originally posted by pyro [/i]
[B]This wasn't meant to be a full page. He asked for a script to redirect users based on resolution, so I gave it to him. I certainly wouldn't consider [B]that[/B] an error... ? [/B][/QUOTE][font=georgia]Perhaps not an error but something far worse, a grievous sin.[/font]
@pyroJan 20.2003 — #[i]Originally posted by Charles [/i]
[B][font=georgia]Perhaps not an error but something far worse, a grievous sin.[/font] [/B][/QUOTE]Did you even read my last post?? I specifically said that this wasn't meant to be the complete page, simply the JavaScript necessary to perform the funtion that he asked for.
[i]Originally posted by pyro[/i]
[b]This wasn't meant to be a full page.[/b][/QUOTE]
@CharlesJan 20.2003 — #[font=georgia]Yes, it was a sin of omission rather than of commission but no less injurious to Lt.RaZieL's audience or your own soul than had it been one of commission.[/font]
@pyroJan 20.2003 — #[i]Originally posted by Charles [/i]
[B][font=georgia]Yes, it was a sin of omission rather than of commission but no less injurious to Lt.RaZieL's audience or your own soul than had it been one of commission.[/font] [/B][/QUOTE]Oh my gosh...You have got to be kidding me...