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


Groups > comp.lang.javascript > #32278

Re: Read in file to array.

Newsgroups comp.lang.javascript
Date 2017-01-23 11:56 -0800
References (5 earlier) <8faaf70c-8e7b-4dc5-a023-9ce2d2996c2c@googlegroups.com> <931577e5-a727-4243-99af-d0b436760cc8@googlegroups.com> <2fd047d8-bee3-4192-8c4a-799c84d6876c@googlegroups.com> <fb96a259-8a1b-4202-b615-3ef6fed59ac7@googlegroups.com> <4d6a078b-9944-4244-8fb6-d5b23ed42635@googlegroups.com>
Message-ID <1863dd79-c818-446e-8720-6db25d522ea8@googlegroups.com> (permalink)
Subject Re: Read in file to array.
From jonas.thornvall@gmail.com

Show all headers | View raw


Den måndag 23 januari 2017 kl. 20:39:06 UTC+1 skrev jonas.t...@gmail.com:
> Den måndag 23 januari 2017 kl. 20:24:35 UTC+1 skrev jonas.t...@gmail.com:
> > Den måndag 23 januari 2017 kl. 19:29:54 UTC+1 skrev Michael Haufe (TNO):
> > > jonas.t...@gmail.com wrote:
> > > 
> > > > [... code ...]
> > > 
> > > copy and paste your JavaScript into here and fix the problems you see:
> > > 
> > > <http://jshint.com/>
> > 
> > Well i think i can see what is going on but i just don't understand the inline functions within functions.
> > What i probably wan't is to make textFromFileLoaded visible outside the {} paragraphs, but i am a bit lost i really do not understand this code.
> > 
> > I find it strange though that i can not define a global variable mytext and copy textFromFileLoaded to it? And why does it work the second time.
> > 
> >   fileReader.onload = function(fileLoadedEvent) 
> >     { 
> >         textFromFileLoaded = fileLoadedEvent.target.result; 
> >         document.debug.data.value = textFromFileLoaded;
> >         mytext=textFromFileLoaded; 
> >         
> >     };
> 
> But the good part load graph works i just have to push load button two times ;)

This is my "working with two loads" code but if someone straight away can say the cause why i can't load mytext first time and it say undefined or howto use textFromFileLoade outside the brackets "function?", i am all ears.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Read in file to array. jonas.thornvall@gmail.com - 2017-01-23 03:29 -0800
  Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-23 03:59 -0800
    Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-23 06:26 -0800
      Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-23 07:41 -0800
        Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-23 08:08 -0800
          Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-23 08:43 -0800
            Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-23 09:41 -0800
              Re: Read in file to array. "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2017-01-23 10:29 -0800
                Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-23 11:24 -0800
                Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-23 11:38 -0800
                Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-23 11:56 -0800
                Re: Read in file to array. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-01-23 20:36 +0000
                Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-23 19:54 -0800
                Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-23 20:10 -0800
                Re: Read in file to array. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-01-24 14:27 +0000
                Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-24 08:24 -0800
                Re: Read in file to array. Jake Jarvis <pig_in_shoes@yahoo.com> - 2017-01-24 17:42 +0100
                Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-24 08:54 -0800
                Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-24 09:04 -0800
                Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-24 11:07 -0800
                Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-24 13:17 -0800
                Re: Read in file to array. Tim Streater <timstreater@greenbee.net> - 2017-01-24 21:35 +0000
                Re: Read in file to array. Jake Jarvis <pig_in_shoes@yahoo.com> - 2017-01-24 22:42 +0100
                Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-24 15:32 -0800
                Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-24 15:55 -0800
                Re: Read in file to array. Tim Streater <timstreater@greenbee.net> - 2017-01-25 08:59 +0000
                Re: Read in file to array. Jake Jarvis <pig_in_shoes@yahoo.com> - 2017-01-25 01:58 +0100
                Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-24 18:51 -0800
                Re: Read in file to array. Jake Jarvis <pig_in_shoes@yahoo.com> - 2017-01-25 10:29 +0100
                Re: Read in file to array. Tim Streater <timstreater@greenbee.net> - 2017-01-25 08:58 +0000
                Re: Read in file to array. jonas.thornvall@gmail.com - 2017-01-23 12:28 -0800
      Re: Read in file to array. Tim Streater <timstreater@greenbee.net> - 2017-01-24 17:21 +0000

csiph-web