small script question. need proper syntax

O

odyssey

HI! below is a part of a script that I need to add an else statement so that
if a different rez is detected that does not match any of the IF statement
that it will default to the one that I specify.
I tried just putting an else statement with the line I want but it does not
work can someone correct me?



if (Wvalue==640&&Hvalue==480) {
image="../../../../../../../../../../../../../images/background_files/backgr
ound_blue_640x480.jpg";

else
image="../../../../../../../../../../../../../images/background_files/backgr
ound_blue_640x480.jpg";

Thanks :)

odyssey
 
O

odyssey

No. that's not what I meant. there are actually several IF statements and I
want a default one. if the nothing matches the what is in the if statements
I want it to default to 800x600 screen rez.

odyssey
 
A

Andrew Murray

ok...so the else clause should surely point to an image like 800_600image.jpg not
640_480image.jpg?
as has been pointed out, they are pointing to the same image so whatever
resolution the user has, the 640_480image.jpg is going to load.
 
O

odyssey

HI! ok, I see that I am not explaining what I want properly. so I will give
the whole piece and what it does. ( all I want is the proper way to sent it
to a default image)

Now. the code below checks if the users resolution matches any of the below
values and if so it loads the given image. now what if the user has a rez
that is not listed below? at this point as the code is it would not load any
image at all right?

So I need to add else statement so if the user does not have any of the sez
below it would at least load one image that I define as a default image.

How do I add the ELSE statement?


Below is the in a js file.
-----------------------------------------Start of code-----------------
var Wvalue=(0)
var Hvalue=(0)
Wvalue=screen.width
Hvalue=screen.height
var image="";
if (Wvalue==800&&Hvalue==600) {
image="../../../../../../../../../../../../../secondchance/images/background
_files/background_blue_1.jpg";
}
if (Wvalue==640&&Hvalue==480) {
image="../../../../../../../../../../../../../secondchance/images/background
_files/background_blue_2.jpg";
}
if (Wvalue==1024&&Hvalue==768) {
image="../../../../../../../../../../../../../secondchance/images/background
_files/background_blue_2.jpg";
}
if (Wvalue==1080&&Hvalue==1024) {
image="../../../../../../../../../../../../../secondchance/images/background
_files/background_blue_4.jpg";
}


document.open();
document.write("<BODY BACKGROUND='"+image+"'>");
document.write("<CENTER><\/CENTER>");

----------------------------------------------------------End of
code--------------------


Thanks for the responses guy and your patience :)

odyssey
 
J

Jens Peter Karlsen[FP-MVP]

No need for an else. Instead of declaring image as an empty string,
declare it with the default image. If one of the if sentences evaluates
to true, the value will be overwritten.

Lastly I must again stress that the resolution is the wrong thing to
test for, instead you should test for the size of the browser window.
They will rarely be the same.

And out of curiosity, why do you write an empty center tag to the body?

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: odyssey [mailto:p[email protected]]
Posted At: 04. august 2004 02:52
Posted To: microsoft.public.frontpage.client
Conversation: small script question. need proper syntax
Subject: Re: small script question. need proper syntax


HI! ok, I see that I am not explaining what I want properly. so I will
give the whole piece and what it does. ( all I want is the proper way to
sent it to a default image)

Now. the code below checks if the users resolution matches any of the
below values and if so it loads the given image. now what if the user
has a rez that is not listed below? at this point as the code is it
would not load any image at all right?

So I need to add else statement so if the user does not have any of the
sez below it would at least load one image that I define as a default
image.

How do I add the ELSE statement?


Below is the in a js file.
-----------------------------------------Start of code-----------------
var Wvalue=(0) var Hvalue=(0) Wvalue=screen.width Hvalue=screen.height
var image=""; if (Wvalue==800&&Hvalue==600) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_1.jpg";
}
if (Wvalue==640&&Hvalue==480) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_2.jpg";
}
if (Wvalue==1024&&Hvalue==768) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_2.jpg";
}
if (Wvalue==1080&&Hvalue==1024) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_4.jpg";
}


document.open();
document.write("<BODY BACKGROUND='"+image+"'>");
document.write("<CENTER><\/CENTER>");

----------------------------------------------------------End of
code--------------------


Thanks for the responses guy and your patience :)

odyssey
 
O

odyssey

HI! thanks, that's what I wanted to know. the reason for the rez is that I
don't use a tillable image type. and I want only one centered image that
takes up the whole screen.

I don't want to check for the browser window for the above reason as I only
create 4 separate image this way. ( Unless I am missing something, that you
see ) :)

If you have an example of checking the browser window I would like to see
it.

Thanks very much for the response,


Jens Peter Karlsen said:
No need for an else. Instead of declaring image as an empty string,
declare it with the default image. If one of the if sentences evaluates
to true, the value will be overwritten.

Lastly I must again stress that the resolution is the wrong thing to
test for, instead you should test for the size of the browser window.
They will rarely be the same.

And out of curiosity, why do you write an empty center tag to the body?

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: odyssey [mailto:p[email protected]]
Posted At: 04. august 2004 02:52
Posted To: microsoft.public.frontpage.client
Conversation: small script question. need proper syntax
Subject: Re: small script question. need proper syntax


HI! ok, I see that I am not explaining what I want properly. so I will
give the whole piece and what it does. ( all I want is the proper way to
sent it to a default image)

Now. the code below checks if the users resolution matches any of the
below values and if so it loads the given image. now what if the user
has a rez that is not listed below? at this point as the code is it
would not load any image at all right?

So I need to add else statement so if the user does not have any of the
sez below it would at least load one image that I define as a default
image.

How do I add the ELSE statement?


Below is the in a js file.
-----------------------------------------Start of code-----------------
var Wvalue=(0) var Hvalue=(0) Wvalue=screen.width Hvalue=screen.height
var image=""; if (Wvalue==800&&Hvalue==600) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_1.jpg";
}
if (Wvalue==640&&Hvalue==480) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_2.jpg";
}
if (Wvalue==1024&&Hvalue==768) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_2.jpg";
}
if (Wvalue==1080&&Hvalue==1024) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_4.jpg";
}


document.open();
document.write("<BODY BACKGROUND='"+image+"'>");
document.write("<CENTER><\/CENTER>");

----------------------------------------------------------End of
code--------------------


Thanks for the responses guy and your patience :)

odyssey















Andrew Murray said:
ok...so the else clause should surely point to an image like 800_600image.jpg not
640_480image.jpg?
as has been pointed out, they are pointing to the same image so
whatever resolution the user has, the 640_480image.jpg is going to load.

image="../../../../../../../../../../../../../images/background_files/ba
ckgr
image="../../../../../../../../../../../../../images/background_files/ba
ckgr
 
R

Ronx

You seem to be missing users like me who use a screen resolution of
1280x1024, but open their browsers in a 800x600 window. The image
determined from the high resolution screen would be the wrong one for the
small window. I *never* browse at full screen.

Ron
--
Reply only to group - emails will be deleted unread.


odyssey said:
HI! thanks, that's what I wanted to know. the reason for the rez is that I
don't use a tillable image type. and I want only one centered image that
takes up the whole screen.

I don't want to check for the browser window for the above reason as I only
create 4 separate image this way. ( Unless I am missing something, that you
see ) :)

If you have an example of checking the browser window I would like to see
it.

Thanks very much for the response,


Jens Peter Karlsen said:
No need for an else. Instead of declaring image as an empty string,
declare it with the default image. If one of the if sentences evaluates
to true, the value will be overwritten.

Lastly I must again stress that the resolution is the wrong thing to
test for, instead you should test for the size of the browser window.
They will rarely be the same.

And out of curiosity, why do you write an empty center tag to the body?

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: odyssey [mailto:p[email protected]]
Posted At: 04. august 2004 02:52
Posted To: microsoft.public.frontpage.client
Conversation: small script question. need proper syntax
Subject: Re: small script question. need proper syntax


HI! ok, I see that I am not explaining what I want properly. so I will
give the whole piece and what it does. ( all I want is the proper way to
sent it to a default image)

Now. the code below checks if the users resolution matches any of the
below values and if so it loads the given image. now what if the user
has a rez that is not listed below? at this point as the code is it
would not load any image at all right?

So I need to add else statement so if the user does not have any of the
sez below it would at least load one image that I define as a default
image.

How do I add the ELSE statement?


Below is the in a js file.
-----------------------------------------Start of code-----------------
var Wvalue=(0) var Hvalue=(0) Wvalue=screen.width Hvalue=screen.height
var image=""; if (Wvalue==800&&Hvalue==600) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_1.jpg";
}
if (Wvalue==640&&Hvalue==480) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_2.jpg";
}
if (Wvalue==1024&&Hvalue==768) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_2.jpg";
}
if (Wvalue==1080&&Hvalue==1024) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_4.jpg";
}


document.open();
document.write("<BODY BACKGROUND='"+image+"'>");
document.write("<CENTER><\/CENTER>");

----------------------------------------------------------End of
code--------------------


Thanks for the responses guy and your patience :)

odyssey















Andrew Murray said:
ok...so the else clause should surely point to an image like 800_600image.jpg not
640_480image.jpg?
as has been pointed out, they are pointing to the same image so
whatever resolution the user has, the 640_480image.jpg is going to load.

No. that's not what I meant. there are actually several IF
statements and I
want a default one. if the nothing matches the what is in the if statements
I want it to default to 800x600 screen rez.

odyssey

Nothing changes because both are pointing to the same image.


--
Mike -- FrontPage MVP '97-'02
http://www.websunlimited.com
FrontPage Add-ins Since '97 FP 2003 / 2002 / 2000 Compatible

HI! below is a part of a script that I need to add an else
statement so
that
if a different rez is detected that does not match any of the IF
statement
that it will default to the one that I specify.
I tried just putting an else statement with the line I want but
it does
not
work can someone correct me?



if (Wvalue==640&&Hvalue==480) {

image="../../../../../../../../../../../../../images/background_files/ba
ckgr
image="../../../../../../../../../../../../../images/background_files/ba
ckgr
ound_blue_640x480.jpg";

Thanks :)

odyssey
 
O

odyssey

HI! Yes I guess this is something that I should take a look at. the site
below is one with this type on setting, can you go to it and tell me if it
allows you to scrolls left to right to see the background image or is it
just cut off for you?

http://www.webcandesign.com/secondchance/index.htm

Ps.. thanks for pointing this out to me :)

Odyssey

Ronx said:
You seem to be missing users like me who use a screen resolution of
1280x1024, but open their browsers in a 800x600 window. The image
determined from the high resolution screen would be the wrong one for the
small window. I *never* browse at full screen.

Ron
--
Reply only to group - emails will be deleted unread.


odyssey said:
HI! thanks, that's what I wanted to know. the reason for the rez is that I
don't use a tillable image type. and I want only one centered image that
takes up the whole screen.

I don't want to check for the browser window for the above reason as I only
create 4 separate image this way. ( Unless I am missing something, that you
see ) :)

If you have an example of checking the browser window I would like to see
it.

Thanks very much for the response,


Jens Peter Karlsen said:
No need for an else. Instead of declaring image as an empty string,
declare it with the default image. If one of the if sentences evaluates
to true, the value will be overwritten.

Lastly I must again stress that the resolution is the wrong thing to
test for, instead you should test for the size of the browser window.
They will rarely be the same.

And out of curiosity, why do you write an empty center tag to the body?

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: odyssey [mailto:p[email protected]]
Posted At: 04. august 2004 02:52
Posted To: microsoft.public.frontpage.client
Conversation: small script question. need proper syntax
Subject: Re: small script question. need proper syntax


HI! ok, I see that I am not explaining what I want properly. so I will
give the whole piece and what it does. ( all I want is the proper way
to
 
R

Ronx

That background image appears to be tiled, the image width being about 500px
or so. (guessed, not measured). However, the image at the top caused a
bottom scroll bar to appear, which disappeared when I opened the browser to
a width of approx. 810px.

Ron
--
Reply only to group - emails will be deleted unread.


odyssey said:
HI! Yes I guess this is something that I should take a look at. the site
below is one with this type on setting, can you go to it and tell me if it
allows you to scrolls left to right to see the background image or is it
just cut off for you?

http://www.webcandesign.com/secondchance/index.htm

Ps.. thanks for pointing this out to me :)

Odyssey

Ronx said:
You seem to be missing users like me who use a screen resolution of
1280x1024, but open their browsers in a 800x600 window. The image
determined from the high resolution screen would be the wrong one for the
small window. I *never* browse at full screen.

Ron
that
I
don't use a tillable image type. and I want only one centered image that
takes up the whole screen.

I don't want to check for the browser window for the above reason as I only
create 4 separate image this way. ( Unless I am missing something,
that
you
see ) :)

If you have an example of checking the browser window I would like to see
it.

Thanks very much for the response,


No need for an else. Instead of declaring image as an empty string,
declare it with the default image. If one of the if sentences evaluates
to true, the value will be overwritten.

Lastly I must again stress that the resolution is the wrong thing to
test for, instead you should test for the size of the browser window.
They will rarely be the same.

And out of curiosity, why do you write an empty center tag to the body?

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: odyssey [mailto:p[email protected]]
Posted At: 04. august 2004 02:52
Posted To: microsoft.public.frontpage.client
Conversation: small script question. need proper syntax
Subject: Re: small script question. need proper syntax


HI! ok, I see that I am not explaining what I want properly. so I will
give the whole piece and what it does. ( all I want is the proper
way
the
 
T

Thomas A. Rowe

FYI, I normally exit sites immediately when they have a fixed background image where the content
scrolls over the background, as if bothers my eyes.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================


odyssey said:
HI! Yes I guess this is something that I should take a look at. the site
below is one with this type on setting, can you go to it and tell me if it
allows you to scrolls left to right to see the background image or is it
just cut off for you?

http://www.webcandesign.com/secondchance/index.htm

Ps.. thanks for pointing this out to me :)

Odyssey

Ronx said:
You seem to be missing users like me who use a screen resolution of
1280x1024, but open their browsers in a 800x600 window. The image
determined from the high resolution screen would be the wrong one for the
small window. I *never* browse at full screen.

Ron
--
Reply only to group - emails will be deleted unread.


odyssey said:
HI! thanks, that's what I wanted to know. the reason for the rez is that I
don't use a tillable image type. and I want only one centered image that
takes up the whole screen.

I don't want to check for the browser window for the above reason as I only
create 4 separate image this way. ( Unless I am missing something, that you
see ) :)

If you have an example of checking the browser window I would like to see
it.

Thanks very much for the response,


No need for an else. Instead of declaring image as an empty string,
declare it with the default image. If one of the if sentences evaluates
to true, the value will be overwritten.

Lastly I must again stress that the resolution is the wrong thing to
test for, instead you should test for the size of the browser window.
They will rarely be the same.

And out of curiosity, why do you write an empty center tag to the body?

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: odyssey [mailto:p[email protected]]
Posted At: 04. august 2004 02:52
Posted To: microsoft.public.frontpage.client
Conversation: small script question. need proper syntax
Subject: Re: small script question. need proper syntax


HI! ok, I see that I am not explaining what I want properly. so I will
give the whole piece and what it does. ( all I want is the proper way
to
sent it to a default image)

Now. the code below checks if the users resolution matches any of the
below values and if so it loads the given image. now what if the user
has a rez that is not listed below? at this point as the code is it
would not load any image at all right?

So I need to add else statement so if the user does not have any of the
sez below it would at least load one image that I define as a default
image.

How do I add the ELSE statement?


Below is the in a js file.
-----------------------------------------Start of code-----------------
var Wvalue=(0) var Hvalue=(0) Wvalue=screen.width Hvalue=screen.height
var image=""; if (Wvalue==800&&Hvalue==600) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_1.jpg";
}
if (Wvalue==640&&Hvalue==480) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_2.jpg";
}
if (Wvalue==1024&&Hvalue==768) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_2.jpg";
}
if (Wvalue==1080&&Hvalue==1024) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_4.jpg";
}


document.open();
document.write("<BODY BACKGROUND='"+image+"'>");
document.write("<CENTER><\/CENTER>");

----------------------------------------------------------End of
code--------------------


Thanks for the responses guy and your patience :)

odyssey















ok...so the else clause should surely point to an image like
800_600image.jpg not
640_480image.jpg?
as has been pointed out, they are pointing to the same image so
whatever resolution the user has, the 640_480image.jpg is going to
load.

No. that's not what I meant. there are actually several IF
statements
and I
want a default one. if the nothing matches the what is in the if
statements
I want it to default to 800x600 screen rez.

odyssey

Nothing changes because both are pointing to the same image.


--
Mike -- FrontPage MVP '97-'02
http://www.websunlimited.com
FrontPage Add-ins Since '97 FP 2003 / 2002 / 2000 Compatible

HI! below is a part of a script that I need to add an else
statement
so
that
if a different rez is detected that does not match any of the IF
statement
that it will default to the one that I specify.
I tried just putting an else statement with the line I want but
it
does
not
work can someone correct me?



if (Wvalue==640&&Hvalue==480) {


image="../../../../../../../../../../../../../images/background_files/ba
ckgr
ound_blue_640x480.jpg";

else


image="../../../../../../../../../../../../../images/background_files/ba
ckgr
ound_blue_640x480.jpg";

Thanks :)

odyssey
 
J

Jens Peter Karlsen[FP-MVP]

Your empty center tag will not center the background image. For that you
need to use CSS.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: odyssey [mailto:p[email protected]]
Posted At: 04. august 2004 17:44
Posted To: microsoft.public.frontpage.client
Conversation: small script question. need proper syntax
Subject: Re: small script question. need proper syntax


HI! thanks, that's what I wanted to know. the reason for the rez is that
I don't use a tillable image type. and I want only one centered image
that takes up the whole screen.

I don't want to check for the browser window for the above reason as I
only create 4 separate image this way. ( Unless I am missing something,
that you see ) :)

If you have an example of checking the browser window I would like to
see it.

Thanks very much for the response,


Jens Peter Karlsen said:
No need for an else. Instead of declaring image as an empty string,
declare it with the default image. If one of the if sentences
evaluates to true, the value will be overwritten.

Lastly I must again stress that the resolution is the wrong thing to
test for, instead you should test for the size of the browser window.
They will rarely be the same.

And out of curiosity, why do you write an empty center tag to the body?

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: odyssey [mailto:p[email protected]]
Posted At: 04. august 2004 02:52
Posted To: microsoft.public.frontpage.client
Conversation: small script question. need proper syntax
Subject: Re: small script question. need proper syntax


HI! ok, I see that I am not explaining what I want properly. so I will
 
O

odyssey

Wow. I did not know it would be such an issue. hmmm. I will not put allot of
attentions on this. I will continue on this thread and hope that all of you
will participate on this as I think it will be good as well for others.

All code for what we will discuss will be given concerning this issue ( off
course ).

Odyssey


Jens Peter Karlsen said:
Your empty center tag will not center the background image. For that you
need to use CSS.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: odyssey [mailto:p[email protected]]
Posted At: 04. august 2004 17:44
Posted To: microsoft.public.frontpage.client
Conversation: small script question. need proper syntax
Subject: Re: small script question. need proper syntax


HI! thanks, that's what I wanted to know. the reason for the rez is that
I don't use a tillable image type. and I want only one centered image
that takes up the whole screen.

I don't want to check for the browser window for the above reason as I
only create 4 separate image this way. ( Unless I am missing something,
that you see ) :)

If you have an example of checking the browser window I would like to
see it.

Thanks very much for the response,


Jens Peter Karlsen said:
No need for an else. Instead of declaring image as an empty string,
declare it with the default image. If one of the if sentences
evaluates to true, the value will be overwritten.

Lastly I must again stress that the resolution is the wrong thing to
test for, instead you should test for the size of the browser window.
They will rarely be the same.

And out of curiosity, why do you write an empty center tag to the body?

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: odyssey [mailto:p[email protected]]
Posted At: 04. august 2004 02:52
Posted To: microsoft.public.frontpage.client
Conversation: small script question. need proper syntax
Subject: Re: small script question. need proper syntax


HI! ok, I see that I am not explaining what I want properly. so I will
give the whole piece and what it does. ( all I want is the proper way
to sent it to a default image)

Now. the code below checks if the users resolution matches any of the
below values and if so it loads the given image. now what if the user
has a rez that is not listed below? at this point as the code is it
would not load any image at all right?

So I need to add else statement so if the user does not have any of
the sez below it would at least load one image that I define as a
default image.

How do I add the ELSE statement?


Below is the in a js file.
-----------------------------------------Start of
code----------------- var Wvalue=(0) var Hvalue=(0)
Wvalue=screen.width Hvalue=screen.height var image=""; if
(Wvalue==800&&Hvalue==600) {
image="../../../../../../../../../../../../../secondchance/images/back
gr
ound
_files/background_blue_1.jpg";
}
if (Wvalue==640&&Hvalue==480) {
image="../../../../../../../../../../../../../secondchance/images/back
gr
ound
_files/background_blue_2.jpg";
}
if (Wvalue==1024&&Hvalue==768) {
image="../../../../../../../../../../../../../secondchance/images/back
gr
ound
_files/background_blue_2.jpg";
}
if (Wvalue==1080&&Hvalue==1024) {
image="../../../../../../../../../../../../../secondchance/images/back
gr
ound
_files/background_blue_4.jpg";
}


document.open();
document.write("<BODY BACKGROUND='"+image+"'>");
document.write("<CENTER><\/CENTER>");

----------------------------------------------------------End of
code--------------------


Thanks for the responses guy and your patience :)

odyssey
 
O

odyssey

Wow. I did not know it would be such an issue. hmmm. I will not put allot of
attentions on this. I will continue on this thread and hope that all of you
will participate on this as I think it will be good as well for others.

All code for what we will discuss will be given concerning this issue ( off
course ).

Odyssey
 
O

odyssey

opps. I have being trying something, to put it into a *.js file. I wonder if
you have being looking at it when I change it. hmmm. ok I will post again
when I have restored it.
I have to go out now. for 2 hour. its 6:47 pm eastern time. I will get back
to you . and thanks again for the info... :)

odyssey



Ronx said:
That background image appears to be tiled, the image width being about 500px
or so. (guessed, not measured). However, the image at the top caused a
bottom scroll bar to appear, which disappeared when I opened the browser to
a width of approx. 810px.

Ron
--
Reply only to group - emails will be deleted unread.


odyssey said:
HI! Yes I guess this is something that I should take a look at. the site
below is one with this type on setting, can you go to it and tell me if it
allows you to scrolls left to right to see the background image or is it
just cut off for you?

http://www.webcandesign.com/secondchance/index.htm

Ps.. thanks for pointing this out to me :)

Odyssey

Ronx said:
You seem to be missing users like me who use a screen resolution of
1280x1024, but open their browsers in a 800x600 window. The image
determined from the high resolution screen would be the wrong one for the
small window. I *never* browse at full screen.

Ron
--
Reply only to group - emails will be deleted unread.


HI! thanks, that's what I wanted to know. the reason for the rez is
that
I
don't use a tillable image type. and I want only one centered image that
takes up the whole screen.

I don't want to check for the browser window for the above reason as I
only
create 4 separate image this way. ( Unless I am missing something, that
you
see ) :)

If you have an example of checking the browser window I would like
to
see
it.

Thanks very much for the response,


No need for an else. Instead of declaring image as an empty string,
declare it with the default image. If one of the if sentences evaluates
to true, the value will be overwritten.

Lastly I must again stress that the resolution is the wrong thing to
test for, instead you should test for the size of the browser window.
They will rarely be the same.

And out of curiosity, why do you write an empty center tag to the body?

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: odyssey [mailto:p[email protected]]
Posted At: 04. august 2004 02:52
Posted To: microsoft.public.frontpage.client
Conversation: small script question. need proper syntax
Subject: Re: small script question. need proper syntax


HI! ok, I see that I am not explaining what I want properly. so I will
give the whole piece and what it does. ( all I want is the proper
way
to

sent it to a default image)

Now. the code below checks if the users resolution matches any of the
below values and if so it loads the given image. now what if the user
has a rez that is not listed below? at this point as the code is it
would not load any image at all right?

So I need to add else statement so if the user does not have any
of
the
sez below it would at least load one image that I define as a default
image.

How do I add the ELSE statement?


Below is the in a js file.
-----------------------------------------Start of code-----------------
var Wvalue=(0) var Hvalue=(0) Wvalue=screen.width Hvalue=screen.height
var image=""; if (Wvalue==800&&Hvalue==600) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_1.jpg";
}
if (Wvalue==640&&Hvalue==480) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_2.jpg";
}
if (Wvalue==1024&&Hvalue==768) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_2.jpg";
}
if (Wvalue==1080&&Hvalue==1024) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_4.jpg";
}


document.open();
document.write("<BODY BACKGROUND='"+image+"'>");
document.write("<CENTER><\/CENTER>");

----------------------------------------------------------End of
code--------------------


Thanks for the responses guy and your patience :)

odyssey















ok...so the else clause should surely point to an image like
800_600image.jpg not
640_480image.jpg?
as has been pointed out, they are pointing to the same image so
whatever resolution the user has, the 640_480image.jpg is going to
load.

No. that's not what I meant. there are actually several IF
statements
and I
want a default one. if the nothing matches the what is in the if
statements
I want it to default to 800x600 screen rez.

odyssey

Nothing changes because both are pointing to the same image.


--
Mike -- FrontPage MVP '97-'02
http://www.websunlimited.com
FrontPage Add-ins Since '97 FP 2003 / 2002 / 2000 Compatible

HI! below is a part of a script that I need to add an else
statement
so
that
if a different rez is detected that does not match any of
the
IF
statement
that it will default to the one that I specify.
I tried just putting an else statement with the line I
want
but
it
does
not
work can someone correct me?



if (Wvalue==640&&Hvalue==480) {


image="../../../../../../../../../../../../../images/background_files/ba
image="../../../../../../../../../../../../../images/background_files/ba
ckgr
ound_blue_640x480.jpg";

Thanks :)

odyssey
 
J

Jens Peter Karlsen [FP MVP]

Just checked the page. A 170KB background image! That makes the entire
page weigh in on over 300KB or approx. 3 times as much as a opening
page should be. People with modems would have to wait around 2 minutes
for it to load. Not many are willing to do that. Remember that the
average viewing time for an opening page like this is just under 10s.
You can easily get a grass image that will tile nicely and only be
10-20KB. A simple search at Google turned up a lot of candidates.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

HI! Yes I guess this is something that I should take a look at. the site
below is one with this type on setting, can you go to it and tell me if it
allows you to scrolls left to right to see the background image or is it
just cut off for you?

http://www.webcandesign.com/secondchance/index.htm

Ps.. thanks for pointing this out to me :)

Odyssey

Ronx said:
You seem to be missing users like me who use a screen resolution of
1280x1024, but open their browsers in a 800x600 window. The image
determined from the high resolution screen would be the wrong one for the
small window. I *never* browse at full screen.

Ron
--
Reply only to group - emails will be deleted unread.


odyssey said:
HI! thanks, that's what I wanted to know. the reason for the rez is that I
don't use a tillable image type. and I want only one centered image that
takes up the whole screen.

I don't want to check for the browser window for the above reason as I only
create 4 separate image this way. ( Unless I am missing something, that you
see ) :)

If you have an example of checking the browser window I would like to see
it.

Thanks very much for the response,


No need for an else. Instead of declaring image as an empty string,
declare it with the default image. If one of the if sentences evaluates
to true, the value will be overwritten.

Lastly I must again stress that the resolution is the wrong thing to
test for, instead you should test for the size of the browser window.
They will rarely be the same.

And out of curiosity, why do you write an empty center tag to the body?

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: odyssey [mailto:p[email protected]]
Posted At: 04. august 2004 02:52
Posted To: microsoft.public.frontpage.client
Conversation: small script question. need proper syntax
Subject: Re: small script question. need proper syntax


HI! ok, I see that I am not explaining what I want properly. so I will
give the whole piece and what it does. ( all I want is the proper way
to
sent it to a default image)

Now. the code below checks if the users resolution matches any of the
below values and if so it loads the given image. now what if the user
has a rez that is not listed below? at this point as the code is it
would not load any image at all right?

So I need to add else statement so if the user does not have any of the
sez below it would at least load one image that I define as a default
image.

How do I add the ELSE statement?


Below is the in a js file.
-----------------------------------------Start of code-----------------
var Wvalue=(0) var Hvalue=(0) Wvalue=screen.width Hvalue=screen.height
var image=""; if (Wvalue==800&&Hvalue==600) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_1.jpg";
}
if (Wvalue==640&&Hvalue==480) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_2.jpg";
}
if (Wvalue==1024&&Hvalue==768) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_2.jpg";
}
if (Wvalue==1080&&Hvalue==1024) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_4.jpg";
}


document.open();
document.write("<BODY BACKGROUND='"+image+"'>");
document.write("<CENTER><\/CENTER>");

----------------------------------------------------------End of
code--------------------


Thanks for the responses guy and your patience :)

odyssey















ok...so the else clause should surely point to an image like
800_600image.jpg not
640_480image.jpg?
as has been pointed out, they are pointing to the same image so
whatever resolution the user has, the 640_480image.jpg is going to
load.

No. that's not what I meant. there are actually several IF
statements
and I
want a default one. if the nothing matches the what is in the if
statements
I want it to default to 800x600 screen rez.

odyssey

Nothing changes because both are pointing to the same image.


--
Mike -- FrontPage MVP '97-'02
http://www.websunlimited.com
FrontPage Add-ins Since '97 FP 2003 / 2002 / 2000 Compatible

HI! below is a part of a script that I need to add an else
statement
so
that
if a different rez is detected that does not match any of the IF
statement
that it will default to the one that I specify.
I tried just putting an else statement with the line I want but
it
does
not
work can someone correct me?



if (Wvalue==640&&Hvalue==480) {


image="../../../../../../../../../../../../../images/background_files/ba
ckgr
ound_blue_640x480.jpg";

else


image="../../../../../../../../../../../../../images/background_files/ba
ckgr
ound_blue_640x480.jpg";

Thanks :)

odyssey
 
O

odyssey

HI! thanks for all the info I will check into it and choose perhaps a
different approach tothis. :)

odyssey

Jens Peter Karlsen said:
Your empty center tag will not center the background image. For that you
need to use CSS.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: odyssey [mailto:p[email protected]]
Posted At: 04. august 2004 17:44
Posted To: microsoft.public.frontpage.client
Conversation: small script question. need proper syntax
Subject: Re: small script question. need proper syntax


HI! thanks, that's what I wanted to know. the reason for the rez is that
I don't use a tillable image type. and I want only one centered image
that takes up the whole screen.

I don't want to check for the browser window for the above reason as I
only create 4 separate image this way. ( Unless I am missing something,
that you see ) :)

If you have an example of checking the browser window I would like to
see it.

Thanks very much for the response,


Jens Peter Karlsen said:
No need for an else. Instead of declaring image as an empty string,
declare it with the default image. If one of the if sentences
evaluates to true, the value will be overwritten.

Lastly I must again stress that the resolution is the wrong thing to
test for, instead you should test for the size of the browser window.
They will rarely be the same.

And out of curiosity, why do you write an empty center tag to the body?

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: odyssey [mailto:p[email protected]]
Posted At: 04. august 2004 02:52
Posted To: microsoft.public.frontpage.client
Conversation: small script question. need proper syntax
Subject: Re: small script question. need proper syntax


HI! ok, I see that I am not explaining what I want properly. so I will
give the whole piece and what it does. ( all I want is the proper way
to sent it to a default image)

Now. the code below checks if the users resolution matches any of the
below values and if so it loads the given image. now what if the user
has a rez that is not listed below? at this point as the code is it
would not load any image at all right?

So I need to add else statement so if the user does not have any of
the sez below it would at least load one image that I define as a
default image.

How do I add the ELSE statement?


Below is the in a js file.
-----------------------------------------Start of
code----------------- var Wvalue=(0) var Hvalue=(0)
Wvalue=screen.width Hvalue=screen.height var image=""; if
(Wvalue==800&&Hvalue==600) {
image="../../../../../../../../../../../../../secondchance/images/back
gr
ound
_files/background_blue_1.jpg";
}
if (Wvalue==640&&Hvalue==480) {
image="../../../../../../../../../../../../../secondchance/images/back
gr
ound
_files/background_blue_2.jpg";
}
if (Wvalue==1024&&Hvalue==768) {
image="../../../../../../../../../../../../../secondchance/images/back
gr
ound
_files/background_blue_2.jpg";
}
if (Wvalue==1080&&Hvalue==1024) {
image="../../../../../../../../../../../../../secondchance/images/back
gr
ound
_files/background_blue_4.jpg";
}


document.open();
document.write("<BODY BACKGROUND='"+image+"'>");
document.write("<CENTER><\/CENTER>");

----------------------------------------------------------End of
code--------------------


Thanks for the responses guy and your patience :)

odyssey
 
O

odyssey

cool I will check this out. thanks for the info :)

Odyssey

Jens Peter Karlsen said:
Just checked the page. A 170KB background image! That makes the entire
page weigh in on over 300KB or approx. 3 times as much as a opening
page should be. People with modems would have to wait around 2 minutes
for it to load. Not many are willing to do that. Remember that the
average viewing time for an opening page like this is just under 10s.
You can easily get a grass image that will tile nicely and only be
10-20KB. A simple search at Google turned up a lot of candidates.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

HI! Yes I guess this is something that I should take a look at. the site
below is one with this type on setting, can you go to it and tell me if it
allows you to scrolls left to right to see the background image or is it
just cut off for you?

http://www.webcandesign.com/secondchance/index.htm

Ps.. thanks for pointing this out to me :)

Odyssey

Ronx said:
You seem to be missing users like me who use a screen resolution of
1280x1024, but open their browsers in a 800x600 window. The image
determined from the high resolution screen would be the wrong one for the
small window. I *never* browse at full screen.

Ron
--
Reply only to group - emails will be deleted unread.


HI! thanks, that's what I wanted to know. the reason for the rez is
that
I
don't use a tillable image type. and I want only one centered image that
takes up the whole screen.

I don't want to check for the browser window for the above reason as I
only
create 4 separate image this way. ( Unless I am missing something, that
you
see ) :)

If you have an example of checking the browser window I would like to see
it.

Thanks very much for the response,


No need for an else. Instead of declaring image as an empty string,
declare it with the default image. If one of the if sentences evaluates
to true, the value will be overwritten.

Lastly I must again stress that the resolution is the wrong thing to
test for, instead you should test for the size of the browser window.
They will rarely be the same.

And out of curiosity, why do you write an empty center tag to the body?

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: odyssey [mailto:p[email protected]]
Posted At: 04. august 2004 02:52
Posted To: microsoft.public.frontpage.client
Conversation: small script question. need proper syntax
Subject: Re: small script question. need proper syntax


HI! ok, I see that I am not explaining what I want properly. so I will
give the whole piece and what it does. ( all I want is the proper
way
to
sent it to a default image)

Now. the code below checks if the users resolution matches any of the
below values and if so it loads the given image. now what if the user
has a rez that is not listed below? at this point as the code is it
would not load any image at all right?

So I need to add else statement so if the user does not have any of the
sez below it would at least load one image that I define as a default
image.

How do I add the ELSE statement?


Below is the in a js file.
-----------------------------------------Start of code-----------------
var Wvalue=(0) var Hvalue=(0) Wvalue=screen.width Hvalue=screen.height
var image=""; if (Wvalue==800&&Hvalue==600) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_1.jpg";
}
if (Wvalue==640&&Hvalue==480) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_2.jpg";
}
if (Wvalue==1024&&Hvalue==768) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_2.jpg";
}
if (Wvalue==1080&&Hvalue==1024) {
image="../../../../../../../../../../../../../secondchance/images/backgr
ound
_files/background_blue_4.jpg";
}


document.open();
document.write("<BODY BACKGROUND='"+image+"'>");
document.write("<CENTER><\/CENTER>");

----------------------------------------------------------End of
code--------------------


Thanks for the responses guy and your patience :)

odyssey















ok...so the else clause should surely point to an image like
800_600image.jpg not
640_480image.jpg?
as has been pointed out, they are pointing to the same image so
whatever resolution the user has, the 640_480image.jpg is going to
load.

No. that's not what I meant. there are actually several IF
statements
and I
want a default one. if the nothing matches the what is in the if
statements
I want it to default to 800x600 screen rez.

odyssey

Nothing changes because both are pointing to the same image.


--
Mike -- FrontPage MVP '97-'02
http://www.websunlimited.com
FrontPage Add-ins Since '97 FP 2003 / 2002 / 2000 Compatible

HI! below is a part of a script that I need to add an else
statement
so
that
if a different rez is detected that does not match any of
the
IF
statement
that it will default to the one that I specify.
I tried just putting an else statement with the line I want but
it
does
not
work can someone correct me?



if (Wvalue==640&&Hvalue==480) {


image="../../../../../../../../../../../../../images/background_files/ba
image="../../../../../../../../../../../../../images/background_files/ba
ckgr
ound_blue_640x480.jpg";

Thanks :)

odyssey
 
Top