JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old June 15th, 2006, 02:03 AM
imatt_78 imatt_78 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2006
Posts: 43 imatt_78 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 31 m 55 sec
Reputation Power: 3
Layer element moved when show in another resolution screen

my question is : can javascript get the screen resolution which user use to see my site ? i want get it to set x (or y) paramater of layer element for right display.
Beccause when i set x,y parameter of Layer,my screen resolution is 1024 - 728, then i reset my screen resolution to 800 - 600, my layer move to horizontal !
Sorry, my english not good.

Reply With Quote
  #2  
Old June 15th, 2006, 02:22 AM
imatt_78 imatt_78 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2006
Posts: 43 imatt_78 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 31 m 55 sec
Reputation Power: 3
.........

Reply With Quote
  #3  
Old June 15th, 2006, 02:22 AM
imatt_78 imatt_78 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2006
Posts: 43 imatt_78 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 31 m 55 sec
Reputation Power: 3
My question seen un-feasible, so anyone tell me another way to prevent Layer element move on another screen resolution ?

Reply With Quote
  #4  
Old June 15th, 2006, 03:21 AM
Kravvitz Kravvitz is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2005
Location: USA
Posts: 134 Kravvitz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 h 38 m 30 sec
Reputation Power: 4

Reply With Quote
  #5  
Old June 16th, 2006, 02:19 AM
imatt_78 imatt_78 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2006
Posts: 43 imatt_78 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 31 m 55 sec
Reputation Power: 3
Quote:
Originally Posted by Kravvitz


thank you very much,but...oh my god ! i tried to read it, but it's very hard to understand because my Eng not good. and i can't see any method,code,command or function to sold my problem. maybe i miss it.
Please help me ! Can you re-write summary it and easy to understand, clearly to do.

Reply With Quote
  #6  
Old June 16th, 2006, 03:15 AM
Kravvitz Kravvitz is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2005
Location: USA
Posts: 134 Kravvitz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 h 38 m 30 sec
Reputation Power: 4
Sorry, I'll try to explain what the article said in simpler terms: screen resolution doesn't matter; it's the width of the browser window that matters. Does that make sense to you?

Try this code from this page.
Code:
var x,y;
if (self.innerHeight) // all except Explorer
{
	x = self.innerWidth;
	y = self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight)
	// Explorer 6 Strict Mode
{
	x = document.documentElement.clientWidth;
	y = document.documentElement.clientHeight;
}
else if (document.body) // other Explorers
{
	x = document.body.clientWidth;
	y = document.body.clientHeight;
}

Reply With Quote
  #7  
Old June 17th, 2006, 08:46 PM
colton22's Avatar
colton22 colton22 is offline
\ ^_^ / - Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: near chicago, Illinois
Posts: 471 colton22 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 1 h 9 m 44 sec
Reputation Power: 3
Send a message via AIM to colton22 Send a message via MSN to colton22 Send a message via Yahoo to colton22
I Had The Same Problem

But I have an answer...

var sw=screen.width; //total screen width resolution
var sh=screen.height; //total screen height resolution
var ww=0; //total window width
var wh=0; //total window height

if (window.innerWidth == null) {
ww = document.body.clientWidth;
wh=document.body.clientHeight;
}
else {
ww = window.innerWidth;
wh = window.innerHeight;
}

// also to pretty much Maximize your browser use this...

parent.moveTo(0,0);
parent.resizeTo(screen.availWidth,screen.availHeig ht);

if you need anymore help, please email me at colton22@comcast.net

colton22 -- http://www.freewebs.com/colton22

si hablas espanol...
yo hablo espanol no muy bien, pero asi.

var sw=screen.width; //total screen width resolution
var sh=screen.height; //total screen height resolution
var ww=0; //total window width
var wh=0; //total window height

if (window.innerWidth == null) {
ww = document.body.clientWidth;
wh=document.body.clientHeight;
}
else {
ww = window.innerWidth;
wh = window.innerHeight;
}

// a Maximize tu browser usa...

parent.moveTo(0,0);
parent.resizeTo(screen.availWidth,screen.availHeig ht);

si nessistas mas, mandar un email a colton22@comcast.net

colton22 -- http://www.freewebs.com/colton22

Reply With Quote
  #8  
Old June 19th, 2006, 09:06 PM
imatt_78 imatt_78 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2006
Posts: 43 imatt_78 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 31 m 55 sec
Reputation Power: 3
thank you

thank Kravvitz and colton22. you have whole-hearted help for me. i will try both.

Reply With Quote
  #9  
Old July 7th, 2006, 03:24 PM
colton22's Avatar
colton22 colton22 is offline
\ ^_^ / - Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: near chicago, Illinois
Posts: 471 colton22 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 1 h 9 m 44 sec
Reputation Power: 3
Send a message via AIM to colton22 Send a message via MSN to colton22 Send a message via Yahoo to colton22
no problem, and i do have one question,
hablas espanol?? - do you speak spanish?

colton22

Reply With Quote
  #10  
Old July 8th, 2006, 01:57 PM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 541 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 2 h 15 m 6 sec
Reputation Power: 3
hablo

[OT]Yo hablo un muy poco, pero no comprendo nada[/OT]

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Layer element moved when show in another resolution screen


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway