|
-
Oct 15th, 2002, 03:25 PM
#1
Thread Starter
Addicted Member
Using an If statement in javascript to change images
Sorry to ask virtually for a chunk of code, but I seem to always be missing something with javascript (i don't even know java).
First of all i need to get the resolution of a computer with javascript. and then decide which image i should display.
Is a nested if statement possible? and if so, what is the code/syntax?
[this is for the banner of a website, the rest of the website is tables which work on percentage..]
thanks in advance.
-
Oct 15th, 2002, 09:25 PM
#2
Black Cat
Code:
//get the screen resolution
var w = screen.width;
var h = screen.height;
if (w == 1024) {
//nested if
if (v == 768) {
//do something
}
} else {
}
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Oct 16th, 2002, 01:03 AM
#3
Thread Starter
Addicted Member
Thanks mate.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|