Re: (!stay) in a tutorial



I was stupid and careless. I thought I had discovered a miracle word,
and posted a stupid question to the forum. The 'stay' was there. I
simply didn't see it.

Thanks a lot and I am sorry for the annoyance.

Dung Ping

McKirahan wrote:
> "Dung Ping" <dungping5@xxxxxxxxx> wrote in message
> news:1128012612.499609.186020@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > I came across following code in a tutorial. I originally thought the
> > word 'stay' in (!stay) was not important, and could be replaced by
> > another word. The negation mark (!) was doing the whole work. But when
> > replacing the 'stay' with another word, such as 'remain', the if
> > conditional did not work.
> >
> > As far as I know, 'stay' is not a reserved word, and is not defined in
> > the code, either. How come it is a must?
> >
> > <html>
> > <head>
> > <script type='text/javascript'>
> >
> > var stay=confirm ("The following site contains appalling material
> > suitable only for webmasters. Please 'ok' to enter, 'cancel' to exit
> > immediately!")
> >
> > if (!stay){
> > window.location="http://www.yahoo.com";
> > }
> > </script>
> > </head>
> > <body>
> > Appalling material here
> > </body>
> > </html>
> >
> > The web page is in:
> > http://www.pinyinology.com/learning/stay.html
> >
> > Thanks.
> > Dung Ping
>
> Did you replace all (both) uses of "stay"?
>
> var stay
>
> if (!stay){

.



Relevant Pages

  • Re: Interesting MAME article
    ... It's a pretty stupid question, which appears to misunderstand the basic ... forum - it was the board's own administrator, ... which you said you would answer a polite question with a polite answer, ... that hasnt been taken (You'd be surprised how many times MCR has been ...
    (alt.games.mame)
  • Re: anoying icon on welcom screen
    ... > stupid question is a question not asked. ... This forum is to help people ... > either to solve problems or learn how to use their computers so they can ... >>> This is something scum like you and Thief should ponder. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: anoying icon on welcom screen
    ... > stupid question is a question not asked. ... This forum is to help people ... > either to solve problems or learn how to use their computers so they can ... >>> This is something scum like you and Thief should ponder. ...
    (microsoft.public.windowsxp.general)
  • Re: anoying icon on welcom screen
    ... > stupid question is a question not asked. ... This forum is to help people ... > either to solve problems or learn how to use their computers so they can ... >>> This is something scum like you and Thief should ponder. ...
    (microsoft.public.windowsxp.newusers)
  • Re: anoying icon on welcom screen
    ... stupid question is a question not asked. ... This forum is to help people ... either to solve problems or learn how to use their computers so they can ... >> This is something scum like you and Thief should ponder. ...
    (microsoft.public.windowsxp.general)