Go Back   Free website templates > Web Template Help > HTML - XHTML - CSS
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Join now to download all the free website templates or post on the forum. If you have never been on a forum before read the FAQ. It's quick, easy and free to join!
Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-24-2009, 02:54 AM
Junior Member
 
Join Date: Jan 2009
Posts: 2
wassup is on a distinguished road
Exclamation change website template if resolution is higher

Hello,

Can anyone help with a suggestion or tips about how can i find the user resolution when enter on my website, and if that resolution is higher or lower (eg: or = 1024) then the image from header to change in another one?

Thanks
  #2 (permalink)  
Old 01-24-2009, 10:11 AM
ishkey's Avatar
Moderator
 
Join Date: Aug 2007
Location: North GA USA
Posts: 1,360
ishkey will become famous soon enough
Default

Code:
<script type="text/javascript">
if ((screen.width<=1024) && (screen.height<=768)) {
window.location.replace('http://example.com/1024-768-or-less');
}
else {
   window.location.replace('http://example.com/greater-than-1024-768');
}
</script>
Once you know what a visitor's screen resolution is, you can redirect them to a particular page. Admittedly, you'd be better off with a page that worked at any screen resolution, but anyhow
__________________
RIF= Reading Is Fun - Understanding Funner
cleandeck - lawn mower undercoating and wilmargraphite - graphite lubricants
  #3 (permalink)  
Old 01-26-2009, 12:46 AM
Junior Member
 
Join Date: Jan 2009
Posts: 2
wassup is on a distinguished road
Default

Thanks ishkey
Closed Thread

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:42 AM.



mouseover mouseover mouseover