HTML question...

Entity

Lifer
Oct 11, 1999
10,090
0
0
Couldn't really find the right forum, so I'm just gonna ask in OT here. We get enough traffic in here anyway, so hopefully someone will be able to answer. I looked on htmlgoodies but couldn't find it.

I'm trying to offer two different pages: one for people at 800x600, and another for people above that. Here's the page...

HFD

How would I do this?

Rob
 

kami

Lifer
Oct 9, 1999
17,627
5
81
ah i see you changed the colors...looks good... try these sites

put this in the body of your index.html and have it redirect to the appropriate resolution/pages...edit the code as necessary. (just ripped from some page)

--------------

<script language=&quot;JavaScript&quot;>



// Finding out which browser is being used//

var type;

name = navigator.appName;

ver = parseInt(navigator.appVersion);

if (name == &quot;Netscape&quot; &amp;&amp; ver >= 3) { type = 1; }

else if (name == &quot;Microsoft Internet Explorer&quot; &amp;&amp; ver >= 4) { type = 2; }

else { type = 0 }


//Dealing with Netscape 3 and later//

if ( type == 1 ) {

var tools=java.awt.Toolkit.getDefaultToolkit();
var size=tools.getScreenSize();
w=size.width;

if ( w <= 640 ) {
location.href = &quot;http://www.easy.com.au/cgi-bin/cwmail.cgi&quot;;
}

else if ( w >= 641 &amp;&amp; w <= 800 ) {
location.href = &quot;http://www.easy.com.au/cgi-bin/cwmail.cgi&quot;;
}

else if ( w >= 801 ) {
location.href = &quot;http://www.easy.com.au/cgi-bin/cwmail.cgi&quot;;
}

}



//Dealing with MSIE4 (this bit of script will also work for Netscape4)//

else if ( type == 2 ) {
if (screen.height==&quot;480&quot;) {
location.href=&quot;http://www.easy.com.au/cgi-bin/cwmail.cgi&quot;;
}

if (screen.height==&quot;600&quot;) {
location.href=&quot;http://www.easy.com.au/cgi-bin/cwmail.cgi&quot;;
}

if (screen.height>&quot;600&quot;) {
location.href=&quot;http://www.easy.com.au/cgi-bin/cwmail.cgi&quot;;
}
}

//Dealing with everything else - default to lowres mode//

else if ( type == 0 ) {
if ( confirm(&quot;Low screen resolution, the use of Netscape2 or other old browser has been detected.\n\nAlthough we have provided for this possibility, you may be unable to use all the features of this site.\n\nIf you are using Microsoft Internet Explorer 3 with a screen resolution of 800x600 or greater, please click on CANCEL, otherwise click on OK.&quot;) == false ) {
location.href = &quot;http://www.easy.com.au/cgi-bin/cwmail.cgi&quot;;
}
else {
location.href = &quot;http://www.easy.com.au/cgi-bin/cwmail.cgi&quot;;
}
}

</script>


-------

alternatively, i found this generator too:

resolution redirector code generator

 

kami

Lifer
Oct 9, 1999
17,627
5
81
you sure that will work for all browsers though? the one i posted is good for netscape 2.x and up, and IE 3.x and up.

edit: yeah i think that one will only work for NS/IE 4.0+
 

Entity

Lifer
Oct 11, 1999
10,090
0
0
Hmm...anyone know if there is a way to make the browser automatically open to full-screen?

Rob
 

hendon

Senior member
Oct 9, 2000
373
0
0
Are you sure you want to be pissing your visitors off by resizing their window automatically?