Re: small script question. need proper syntax
From: odyssey (paul.dallaire_at_sympatico.ca)
Date: 08/04/04
- Next message: Jim Buyens: "re: Database Results Wizard Error - Security Question"
- Previous message: Victoria: "Re: publishing error- 500 T Not Understood"
- In reply to: Jens Peter Karlsen[FP-MVP]: "Re: small script question. need proper syntax"
- Next in thread: odyssey: "Re: small script question. need proper syntax"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 4 Aug 2004 18:39:59 -0400
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[FP-MVP]" <jpkarlsen@mvps.org> wrote in message
news:%235d9CumeEHA.1652@TK2MSFTNGP10.phx.gbl...
> 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:paul.dallaire@sympatico.ca]
> 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[FP-MVP]" <jpkarlsen@mvps.org> wrote in message
> news:OVNMO7ceEHA.3016@tk2msftngp13.phx.gbl...
> > 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:paul.dallaire@sympatico.ca]
> > 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
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > "Andrew Murray" <SPAMadBUSTERmurray@iinet.net.au> wrote in message
> > news:410ecd2e$0$16329$5a62ac22@per-qv1-newsreader-01.iinet.net.au...
> > > 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.
> > >
> > > "odyssey" <paul.dallaire@sympatico.ca> wrote in message
> > > news:B2tPc.7625$Jq2.387591@news20.bellglobal.com...
> > > > 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
> > > >
> > > > "MD Websunlimited" <none@none.com> wrote in message
> > > > news:OOdQ4ZIeEHA.328@TK2MSFTNGP12.phx.gbl...
> > > > > 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
> > > > >
> > > > > "odyssey" <paul.dallaire@sympatico.ca> wrote in message
> > > > news:YvlPc.4777$Jq2.303644@news20.bellglobal.com...
> > > > > > 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
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
- Next message: Jim Buyens: "re: Database Results Wizard Error - Security Question"
- Previous message: Victoria: "Re: publishing error- 500 T Not Understood"
- In reply to: Jens Peter Karlsen[FP-MVP]: "Re: small script question. need proper syntax"
- Next in thread: odyssey: "Re: small script question. need proper syntax"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|