• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

JavaScript Help

Status
Not open for further replies.
Level 17
Joined
Feb 11, 2011
Messages
1,860
Hello guys,

For one of my assignments I have to write an epub readed in JavaScript and I have no idea where to start. The reason is that we have only had 1 JavaScript lecture where they just covered the basics.

If anyone could help me with simply reading from a file in JavaScript, or perhaps point me to a good tutorial that could help me, that would be awesome. I mainly need help with accessing all files in a specific folder.

I have been Googling a lot, but they don't help with accessing multiple files in a folder, just with manually selecting files with a dialog.

This is quite urgent and any help will be appreciated.

Thanks,

Mr_Bean
 
Thanks, will take a look at that.

EDIT: Could someone please explain what is going on here:

Code:
r.onload = (     // r is a variable containing a FileReader
    function (f) {
        return function (e) {
            var contents = e.target.result;
            alert(contents);
        };
    })(f);
I'm not even sure how to indent that properly :/
 
Last edited:
Well if you're not getting help here, stackoverflow might be the place to go. Not sure though, your question isn't that generic
 
Status
Not open for further replies.
Back
Top