NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Javascript code for resolution (you need to edit it)

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search
7 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 09-09-2004, 02:25 PM THREAD STARTER               #1 (permalink)
Account Suspended
 
axilant's Avatar
Join Date: May 2004
Location: /etc/passwd
Posts: 2,178
axilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to behold
 

Member of the Month
July 2005

Javascript code for resolution (you need to edit it)


This is how im using it, im using 2 div's with the ids of header and content.

Just showing you this code, because many people ask for this type of thing so here it is
????: NamePros.com http://www.namepros.com/code/47105-javascript-code-resolution-you-need-edit.html

Code:
<script language="Javascript"><!--
var header = document.getElementById("header");
var content = document.getElementById("content");
if ((screen.width == 800) && (screen.height == 600)) {
var leftsize = "40";
header.style.left = leftsize;
content.style.left = leftsize;
}
if ((screen.width == 1024) && (screen.height == 768)) {
var leftsize = "150";
header.style.left = leftsize;
content.style.left = leftsize;
}
if ((screen.width == 1152) && (screen.height == 864)) {
var leftsize = "200";
header.style.left = leftsize;
content.style.left = leftsize;
}
if ((screen.width == 1280) && (screen.height == 1024)) {
var leftsize = "275";
header.style.left = leftsize;
content.style.left = leftsize;
}
if ((screen.width == 1600) && (screen.height == 1200)) {
var leftsize = "450";
header.style.left = leftsize;
content.style.left = leftsize;
}


//--></script>
PM me any questions, or just post here
axilant is offline  
Old 09-30-2004, 05:08 AM   #2 (permalink)
NamePros Regular
Join Date: Sep 2004
Location: Poland
Posts: 245
Michau is on a distinguished road
 



This script works only with certain fixed resolutions. For example, in my work I have 1024x1280 (yes, it's 1280x1024 rotated 90 degrees - VERY useful for viewing long pages and documents!). Your script will not know what to do with this resolution. You should make it more general.
Michau is offline  
Old 10-02-2004, 08:46 PM THREAD STARTER               #3 (permalink)
Account Suspended
 
axilant's Avatar
Join Date: May 2004
Location: /etc/passwd
Posts: 2,178
axilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to behold
 

Member of the Month
July 2005

Originally Posted by Michau
This script works only with certain fixed resolutions. For example, in my work I have 1024x1280 (yes, it's 1280x1024 rotated 90 degrees - VERY useful for viewing long pages and documents!). Your script will not know what to do with this resolution. You should make it more general.

????: NamePros.com http://www.namepros.com/showthread.php?t=47105
Thats why it says, you will need to edit it.
axilant is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 07:22 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger