FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Script Help!!





alskmaster
Somebody would know to inform one to me script, that it changes the resolution of my page, when somebody to open.


Example:


If a person will have a computer with the resolution 800X600, script will open the page configured for 800X600

If another person will have a computer with the resolution 1024X780, script will open the page with the configuration for 1024X780.


Somebody would know to inform me as is this script?

Thanks
Aimewitue
i find this script on a french site maybe it's what you lookin' for

<SCRIPT language="JavaScript" title="G1SCRIPT">
//Script Généré sur le Site http://www.G1SCRIPT.COM

// browser test:
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 4 || browserName ==
"Microsoft Internet Explorer" && browserVer >= 4)
version = "1";
else if (browserName == "Netscape" && browserVer >= 3)
version = "2";
else
version = "3";
if (version == "1") {
var correctwidth=800
var correctheight=600
if (screen.width<correctwidth||screen.height<correctheight)
location="800x600.htm"
else
location="024.htm"
}
if (version == "2") {
var toolkit = java.awt.Toolkit.getDefaultToolkit();
var screen_size = toolkit.getScreenSize();
var correctwidth=800
var correctheight=600
if (screen_size.width<correctwidth||screen_size.height<correctheight)
location="800x600.htm"
else
location="024.htm"
}
if (version == "3")
location="home.htm"
//Identifiant du script: 100
//Mis en ligne: 26/08/02
//By TANGUY
</SCRIPT>

the source :
http://www.g1script.com/home/LANGAGE/JS/script/user/100.php
Banzai
My two cents:

I find sites that re-size my browser annoying, its up to me how big i want a site to be.
golles
Banzai wrote:
My two cents:

I find sites that re-size my browser annoying, its up to me how big i want a site to be.

I think you misunderstood alskmaster.
I think he has is site for example in 2 sizes, 1 that fits perfext on 800*600 and 1 that fits perfect on 1024*768.
He wants a script that will automatic goto the right resolution.
Hope I understand it right.

Sorry alskmaster I have never seen such script, maybe you can google it?


//golles
Rabagasch
this would be an easier way:

Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>resolution test</title>
<script type="text/javascript">
<!--
if(screen.width <= 800)
 window.location.href = "./800x600.html"
else
 window.location.href = "./1024x768.html"
//-->
</script>
</head>
<body>
</body>
</html>


Simply replace the paths and this file will lead to the pages you want.

My opinion: A well designed page is viewed correctly with all resolutions without horizontal scrolling.
Banzai
Oh, I see.

You could use percentage sizes - rather than pixel sizes for the graphic's, tables, ect... on your site.

By using percentage sizes rather than pixel the page will resize to fit the browser, no matter what rez the user is running in.
Related topics
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.