JavaScript
Make prototype.js’s toQueryString method php safe
One hurdle I came across today is Prototype’s Hash.toQueryString() method, which turns a hash into a query string [bet you couldn't have guessed that ;-)]. The wall I ran into was how it parses arrays within the hash, it would take something like this [in JSON]:
{"someArray": [1,2,3]}
… and run it through toQueryString(), it returns:
someArray=1&someArray=2&someArray=3
… [...]
Read Full Post | Make a Comment ( None so far )Binding your setTimeout methods in JavaScript using Prototype
Never mind, use this instead :-)
www.prototypejs.org/api/function/delay
Two features which are indispensable in Prototype are it’s bind and bindAsEventListener functions. I’m not going to write about what they can do for you, but do know that they are indispensable to OO JavaScript for callbacks, lambda functions, closures etc… One place where I desperately wanted to use bind()ing, [...]