Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.computer > #9994

Re: javascript "print" problem

From Paul <nospam@needed.com>
Newsgroups alt.computer
Subject Re: javascript "print" problem
Date 2016-07-06 04:19 -0400
Organization A noiseless patient Spider
Message-ID <nlieul$fbi$1@dont-email.me> (permalink)
References <a8%ez.18568$TY6.2182@fx38.iad>

Show all headers | View raw


Robert Baer wrote:
>   code:
> str=navigator.userAgent;       // Agent is unique for our purposes
>  document.writeln("Browser sez:"+str+"|<BR>");
>     // above "prints" on the screen
> var subjptr=1;
> while(subjptr < 16)
>  {
> //  gott= EBody.indexOf(subjptr);
> //  gott= EBody(subjptr);
>   gott=str(subjptr) ;
>   document.writeln(gott+"|<BR>");
>     // i get NOTHING, yet tihs code passes two online evaluators
>   if ( EBody.indexOf(subjptr) > -1 ) {
>     msg="You do not qualify as a serious customer."+str(subjptr);
>     document.write (msg);
>                                      }
>   subjptr = subjptr + 1;
>  }
> 
>   So, how do i get it to work ("print")?

Does the environment have stdin, stdout, stderr ?

Is there a procedure to open a particular place
for writes ? Before you start writing ?

Would the code have worked, if interpreted or
compiled or executed from a command prompt
window ?

If I was learning Javascript, I would have to
learn what the "environmental equivalents" were,
to do any programming.

There are *plenty* of environments, where a
naive write into "outer space" will be ignored.
It's up to you to discover what file objects,
have visible side-effects.

Depending on where Javascript is running, there
must be restrictions on the file system access,
in order to prevent exploit code from writing
everywhere. I would not expect I/O to be
"easy" in any case. It should not be trivial,
except if done in a known-working environment.

    Paul

Back to alt.computer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

javascript "print" problem Robert Baer <robertbaer@localnet.com> - 2016-07-05 19:44 -0800
  Re: javascript "print" problem Paul <nospam@needed.com> - 2016-07-06 04:19 -0400
    Re: javascript "print" problem Robert Baer <robertbaer@localnet.com> - 2016-07-06 08:01 -0800
      Re: javascript "print" problem Paul <nospam@needed.com> - 2016-07-06 14:53 -0400
        Re: javascript "print" problem Robert Baer <robertbaer@localnet.com> - 2016-07-08 00:20 -0800

csiph-web