Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Design

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 18-10-2007, 05:44 PM
Novice Webmaster
 
Join Date: Jul 2007
Location: Kuala Lumpur
Posts: 15
Rep Power: 0
JDream is on a distinguished road
Switching background according to resolution

Hi all,

I am working on a project and the customer has requested that the background is able to change itself according to the monitor resolution set by the user.

Eg:-
if(resolution <= 1000) display.1024.jpg
if(resolution <= 1100) display.1152.jpg

and so on*

[*Sorry for the broken Javascript :P]

I've searched across the Internet and they only mostly teach you how to use Javascript to detect the resolution and pop-up a message to the user.

Can someone assist in this Javascript question? Many thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 26-10-2007, 12:06 PM
hashie's Avatar
Inspired Webmaster
 
Join Date: Jun 2007
Location: Kuala Lumpur
Posts: 165
Rep Power: 20
hashie is on a distinguished road
if this stuff, if i'm you, i will do something like "cheating"

mean u get the biggest resolution of bg pics eg 2048 X 1536 pixel of bg pic.

then u set ur wallpaper fix/stretch and unscrollable..so when no matter how big or how small is the resolution, it will still fix with the internet browser. just like u set your wallpaper on the desktop.
__________________
Hash here..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 26-10-2007, 04:31 PM
wingwp's Avatar
Senior Webmaster
 
Join Date: Oct 2003
Location: Selangor
Posts: 249
Rep Power: 66
wingwp is on a distinguished road
JavaScript is able to detect screen resolution but not da browser size I bliv.. then U can archive tis by switchin diff css file to change da background image accordin to client's screen resolution? Normally users r maximizin their web browser while surfin..

A List Apart: Articles: Alternative Style: Working With Alternate Style Sheets

Switch CSS files with Javascript

Mayb d easiest way..

change the background image while "body onLoad"

document.body.background='.gif'

Last edited by wingwp; 26-10-2007 at 04:34 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 22-11-2007, 03:54 PM
wingwp's Avatar
Senior Webmaster
 
Join Date: Oct 2003
Location: Selangor
Posts: 249
Rep Power: 66
wingwp is on a distinguished road
A very nice script to detect wen User resizin his browser dynamically
original source from How to get browser width when resized [Archive] - WebDeveloper.com
I mod a little & it work on my IE & FF

Code:
<script>
window.onresize = myResize;
function myResize() {
if (document.all)
{document.getElementById('BrowsingSize').innerHTML = (document.body.clientWidth);}
else
{document.getElementById('BrowsingSize').innerHTML = (window.innerWidth);}
}
</script>
<div id="BrowsingSize"></div>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 23-11-2007, 03:16 PM
New kid on the block
 
Join Date: Nov 2007
Location: Wilayah Persekutuan
Posts: 9
Rep Power: 0
khyau is on a distinguished road
You may solve this by visiting javafile website.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set layer for all screen resolution? wyngzflower Website Design 1 08-02-2006 08:03 AM
screen resolution honeyz Website Design 3 27-09-2005 09:26 AM
Switching host provider A.S.A.P. MENJ Paid Hosting Discussion Forum 3 25-03-2004 10:24 PM
Switching host provider A.S.A.P. MENJ Mamak Stall 0 23-03-2004 10:36 AM
what is the best resolution view for Web Designers.. Ben-davis Mamak Stall 50 27-08-2003 01:18 PM



All times are GMT +8. The time now is 05:13 AM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59