473,471 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

check resolution

1 New Member
Hi,

I need to check resolution of the user and then present a different image for the each resolution.

I know the JC:

Expand|Select|Wrap|Line Numbers
  1. <script language="javascript">
  2. function GetReso() {
  3.     return screen.width
  4. }
  5.  
But now what i need to do when i have the user resolution.

Thanks

Pini
Aug 19 '07 #1
1 1464
gits
5,390 Recognized Expert Moderator Expert
hey,

welcome to TSDN ...

give your image an id, refer to it and set its src-attribute to the new img-src ... have a look at the example:

Expand|Select|Wrap|Line Numbers
  1. var img_ref = document.getElementById('imageid');
  2. img_ref.src = 'newimagesrc.jpg';
  3.  
kind regards
Aug 19 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Maurice Mertens | last post by:
Hi, I'm building an application in VB.NET that can only be started if the available desktop space is sufficient. This means that when the user starts the application it has to check 2 things: ...
2
by: Maurice Mertens | last post by:
Hi, I'm building an application in VB.NET that can only be started if the available desktop space is sufficient. This means that when the user starts the application it has to check 2 things: ...
9
by: RJ | last post by:
Hi All, Suppose i have a double pointer, how do I check the content of that pointer is a 8/16/24/32 bit data? Any suggestion!! Thanks, Raja
12
by: Ryan | last post by:
Is there anyway to enable spell-checking for user input in a Text Box? Either auto spell-check or create a spell-check button. Using VB 2005.
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.