How to use JSON (updated with example)
This post is an update from the old post. A lot of things changed since it was written and the information in the old one is a bit outdated.
This post is an update from the old post. A lot of things changed since it was written and the information in the old one is a bit outdated.
From time to time, I receive emails from desperate people who want help with their javascript problem. I also receive a lot of emails of people wanting to help me with my “manly problems”. It’s very nice from them to care about me and I take time to reply to each of them but I [...]
Since I have written Ajax and javascript don’t use thread, one of my reader (BK) told me that I was wrong. Here’s the final truth.
What I said
If javascript runs some code that takes 5 seconds to execute and an ajax response arrives at 2 seconds, it will take 3 seconds before it will be executed [...]
Since the beginning of Ask Dan a javascript question, I received a bunch of questions. Here’s the first one I received. It’s from Andrew Worcester.
There seems (to me anyway) to be an overuse of the “new” syntax in libraries. If I create an Ajax object is there a functional benefit to using: “new Ajax.Request(options)” verses [...]
Since ajax, a lot of people are thinking that asynchrone means “in a separated thread”. They are wrong!
Synchronous
The XMLHttpRequest object gives you the option to make a synchronous request to a server with the parameter async set to false. It means that when you call the server, all javascript executions will stop and wait for [...]
These days, you can’t write a web application without using one of the billionth javascript library. Two of them stood out of the crowd : prototype and jQuery. I will explain why did I choose jQuery.
Prototype
Prototype is comfortably installed in a lot of developers mind because of two reasons : it was [...]
UPDATE : This was written more than 2 years ago, read the new post on How to use JSON.
Web2.0 came with the intensive use of the XMLHttpRequest object even if it was already in our browser before then. A lot of format were tried but JSON will be the winner overall.
What is JSON?
JSON is a [...]