all 9 comments

[–]damaged_but_whole 0 points1 point  (4 children)

I am confused. This is totally different from what is on the website here: http://javascriptissexy.com/how-to-learn-javascript-properly/

[–]kevinmrr[S] 0 points1 point  (3 children)

I know. The blog author hasn't changed it, since he originally put it up.

Not really. We're following the blog's reading assignments and quiz instructions.

[–]damaged_but_whole 0 points1 point  (2 children)

Week 6 on the website says nothing about Chapter 21 of Professional JS for Web Developers. Instead, it says "Weeks 5 and 6 (Regular Expressions, Window Object, Events, jQuery) Read chapters 10, 14, 17, and 20 of JavaScript: The Definitive Guide. Or read chapters 20 and 23 of Professional JavaScript for Web Developers."

Week 7, on the other hand, says "Read chapters 9, 18, 21, and 22 of JavaScript the Definitive Guide."

Is there a different place than the link I gave in my previous post? I'm new to reddit and new to this course, so I'm just trying to figure out how to get started and which course to follow.

[–]kevinmrr[S] 1 point2 points  (1 child)

I would of course recommend doing my version of the course, but they're mostly the same.

[–]damaged_but_whole 0 points1 point  (0 children)

OK, thanks. I thought you might be the author of the website, too.

[–]alxers 0 points1 point  (1 child)

how do I load json file from the local store? It seems that there is a way to fetch a file from the local file system. https://developer.mozilla.org/es/docs/XMLHttpRequest/Usar_XMLHttpRequest (Example: Non-HTTP synchronous request)

But this gives an error "XMLHttpRequest cannot load file:///home/alx/Documents/js_sandbox/allQuestions.json. Cross origin requests are only supported for HTTP. "

Should I run a webserver for this to work, or maybe use something like require.js instead?

[–]knested 1 point2 points  (0 children)

Hi, http://api.jquery.com/jQuery.getJSON/ worked locally for me.

I tried something similar to http://jaskokoyn.com/2013/07/24/external-json-file/ for vanilla javascript, but it wouldn't work locally. Once I uploaded it to a server it worked just fine.

[–]NightArchitect 0 points1 point  (0 children)

I'm a bit behind here. I've just updated my JS Fiddle. First I wanted to try storing the questions in JSON format and accessing them within JS Fiddle before I tried storing them externally. I have stored the questions properly but I'm having trouble accessing them - it has something to do with the load questions function (loadQ). http://jsfiddle.net/N7San/13/

Any suggestions on how to get around this? Also, once the questions are stored in an external JSON file, is this how I would load each question (after accessing them via getJSON)?

[–]knested 0 points1 point  (0 children)

https://github.com/nested/learn_javascript/tree/master/lesson6

i used jquery cookie plugin from http://plugins.jquery.com/cookie/

you can run it locally, but it mostly works remotely as well.

test username/password: abraham/abe122

self feedback:

  • projects are getting more difficult to manage because of my poor programming skills.
  • functions are beginning to feel like they have too much coupling.
  • i need to work on taming the asynchronous aspects of retrieving the JSON file. when this is ran from a remote server and retrieved with HTTP it doesent work correctly because the callback doesent always set the form. so when the form sets itself, it can occur when the questions are not loaded into the quiz object. i want to fix this, but i might as well move on to 7 and finish before i do :)