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


Groups > comp.lang.javascript > #32280

Re: Read in file to array.

Path csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.javascript
Subject Re: Read in file to array.
Date Mon, 23 Jan 2017 20:36:40 +0000
Organization A noiseless patient Spider
Lines 38
Message-ID <87sho9v7hj.fsf@bsb.me.uk> (permalink)
References <2b6a77ee-b20d-4f11-bd56-c73f66523ec7@googlegroups.com> <015aa987-b329-446c-9fb9-b7c1317a7a39@googlegroups.com> <30277451-ca92-4bc3-b070-3ed4fd8d2dfc@googlegroups.com> <191ace72-7818-44ca-9dae-d0499239f132@googlegroups.com> <c358c43f-dcda-4bec-a2e8-b57c1b6e27d2@googlegroups.com> <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> <1863dd79-c818-446e-8720-6db25d522ea8@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=iso-8859-1
Content-Transfer-Encoding 8bit
Injection-Info mx02.eternal-september.org; posting-host="2df1bad811653ba1e706494cd1d3929e"; logging-data="5763"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/pDdFIUEVsKfTm/Sa6IHkBr4TKZAubJQ4="
Cancel-Lock sha1:1KpAfX5kJSsW23LZqp9K+qWXve8= sha1:z99NQ59YCLbgB2J6okRrPgiFHwk=
X-BSB-Auth 1.b447e180912e48961a9b.20170123203640GMT.87sho9v7hj.fsf@bsb.me.uk
Xref csiph.com comp.lang.javascript:32280

Show key headers only | View raw


jonas.thornvall@gmail.com writes:

> 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.

Have you posted a link to a site that exhibits the problem?  Code
snippets are unlikely going to get anyone tor reply.

-- 
Ben.

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