Miel Soeterbroek schrieb:
> Thanks Blair, changing Array to Object did the trick…
>
> And indeed, the : was just a typo…
>
>
>
> David, I use the extend functionality all over the place already,
> however, in this case there is no default set of values. Unset
> parameters will just arrive as null on the server.
>
> 1. var params = new Array():
> Probably a typo, but I thought I'd mention it.
> 2. Possibly {} creates an object not an array? In which case change
> var params = new Array();
> to
> var params = new Object();
Always remember: Use [] for true index based arrays, use {} for hash maps.
The following is considered bad-practice:
var arr = [];
arr['foo'] = 'bar';
There even was an "JavaScript 'Array' and 'Object.prototype' Awareness
Day" :-)
http://blog.metawrap.com/blog/June6thIsJavaScriptArrayAndObjectprototypeAwarenessDay.aspx
And:
http://www.andrewdupont.net/2006/05/18/javascript-associative-arrays-considered-harmful/
-- Klaus
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/