• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
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:
Level 8
Joined
Aug 13, 2009
Messages
466
I don't actually know anything about javascript, so I can't help you much. Cept by bumping the thread.
 
Level 8
Joined
Aug 13, 2009
Messages
466
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.
Top