View Full Version : Screen Resolution Script
solboy
06-11-2002, 11:38 PM
Hi,
I am tring to get my forum to show-up perfectly in all browser sizes. Is there a script for this and where do I incert it?
I also have a banner at the top of my page that I want to fit perfectly in all browser sizes.
Is there a script for that also?
Thanks.
Admin
06-12-2002, 05:09 AM
I don't know Javascript too well, but a search on Google came up with this:
http://developer.irt.org/script/285.htm
Maybe someone else can write the script.
madhouse
06-13-2002, 04:54 PM
might try this link here also
http://developer.irt.org/script/867.htm
solboy
06-13-2002, 07:27 PM
Hi Guys,
Thanks for the quick replies.
I always wondered how the text, tables and graphics on some sites showed up the same size in every browser.
I think you found it madhouse.
I will try that.
Find anything else.....let me know.
much love
SolBoy
madhouse
06-14-2002, 08:01 PM
Actually Firefly pointed u in the right direction...I just looked a lil further in the same place that he pointed you in.
solboy
06-15-2002, 02:59 AM
Hey,
More power to the both of you guys.
much love
Solboy
Shokkka
06-16-2002, 03:04 PM
jsut set the template to 100% in the style editing part... then it will fit in an 800X600 res monitor and higher to the edges.. so everyone is happy lol.
Just remeber the banner will have to be 750 pixels wide for it to fit perfectly in an 800x600 browser. k?
yea its simple it works on the forums im using
solboy
06-17-2002, 01:45 AM
Thanks for your input but Firefly and madhouse found exactly what I wanted.
I know how to do what you said, I tried it before I came here for help and it didnt give me the results that I wanted.
much love
Where would you insert this script to make it work on your forums?
Anyone? I could really use this and I am wondering where I would place that script.
<script language="JavaScript">
if (screen.width==640) {
document.write('Resolution is 640x480.');
} else if (screen.width==800) {
document.write('Resolution is 800x600.');
} else if (screen.width==1024) {
document.write('Resolution is 1024x768.');
} else {
document.write('Resolution is greater than 1024x768');
}
</script>
Just off the top of my head; I haven't seen any of those search results.
Lesane
07-14-2003, 06:54 PM
Or you could do this, for different banners:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function redirectPage() {
var url640x480 = "http://www.yoururl.com/urlwithbanner640_480.html";
var url800x600 = "http://www.yoururl.com/urlwithbanner800_600.html";
var url1024x768 = "http://www.yoururl.com/urlwithbanner1024_768.html";
var url1280x1024 = "http://www.yoururl.com/urlwithbanner1280_1024.html";
if ((screen.width == 640) && (screen.height == 480))
window.location.href= url640x480;
else if ((screen.width == 800) && (screen.height == 600))
window.location.href= url800x600;
else if ((screen.width == 1024) && (screen.height == 768))
window.location.href= url1024x768;
else if ((screen.width == 1280) && (screen.height == 1024))
window.location.href= url1280x1024;
else window.location.href= url640x480;
}
// End -->
</script>
</head>
<body onload="redirectPage()">
corsacrazy
07-14-2003, 06:56 PM
this
code:
<script language="JavaScript">
if (screen.width) {
if (screen.width==640) {
document.write('Resolution is 640x480.');
} elseif (screen.width==800) {
document.write('Resolution is 800x600.');
} elseif (screen.width==1024) {
document.write('Resolution is 1024x768.');
} else {
document.write('Resolution is greater than 1024x768');
}
} else {
document.write('Not using Internet Explorer; can't detect resolution.');
}
</script>
didnt werk :( it sed Expected ;
Ehhh...try again... Should work now. :rolleyes:
BTW, Lesane, I was just trying to show how to detect the screen resolution because there are hundreds of things he could want to do with this script...I wanted to provide something that was nice and customizable, and I feel like you just repeated what I already said (but worse). It's not nice. I wouldn't be bothered, but you've been an @$$4073 to me in the past, so I can't help but feel like you're just trying to get attention (a "thank you" even) at my expense.
Also, I've never heard of a screen resolution where height divided by width is not equal to 75%, so those parts in your conditionals are unnecessary.
Good day.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.