Feel free to file a bug on it in the tracker, as an enhancement: http://dev.jquery.com/
--John On 8/18/07, Pops <[EMAIL PROTECTED]> wrote: > > > > On Aug 18, 7:28 pm, Stephan Beal <[EMAIL PROTECTED]> wrote: > > > http://docs.jquery.com/Ajax#load.28_url.2C_params.2C_callback_.29 > > > > .. > > > > In that usage, the params object is indeed an object/map. > > > > The "problem" with that example is that it uses an HTML file as the > > target, whereas (as mentioned in my other post a few minutes ago), > > POST isn't configured to work on some web servers for HTML files. > > I see ya point. To me, thats isn't the main issue here, sure, valid, > but not the main one I am bringing up because you can easily bypass > that limitation. > > Referring back to the other thread OP message, he used {format: > 'xhtml'} as the parameter. > > $('#tags').load('/data/tags', {format: 'xhtml'}); > > and because of the parameter, unbenowst to him, a POST was forced. > > Thinking the solution was too simple, by using the URL to pass > parameters like so: > > $('#tags').load('/data/tags?format=xmtl'); > > which will use a GET, I assumed he had a JSON data passing design > here and wanted to keep that syntax. > > But that doesn't to be the case here. His answer is simply passing the > key/value pairs on the URL. > > Anyway, I referring now to the obstrusive second parameter as a > object, not a string. > > If you got 100 new people using jQuery, they will naturally attempt > to use ampersand delimited key/pairs pairs as a string, not some > obscure JSON object format. > > I mean think about it, why restrict such a simple concept of a > typical key/value pair string and worst, send JUNK to the server when > its not the OBJECT format? > > Thats obstrusive design!. :-) > > Why can't jQuery.param() add a data string type check > > if (a.constructor == string) { > // we got what we want, no more transformations required > } > else > if ( a.constructor == Array || a.jquery ) > .... > > Thats Unobstrusive design!!! > > -- > HLS > >