[jQuery] .load does a GET when callback supplied
I've started to make use of the Thickbox script, and notice that it uses .load in this fashion:
.load(url, callback)
Looking at the JQ source .load performs:
1] a POST if called with just a url
2] a GET if called with a url+callback.
3] a POST if called with url+params+callback
I think there's a bug in the first case, since I suspect the intent was that .load perform a GET when called with just a url. The bug could be fixed by:
changing: if (o !== null) {
to : if (o && o !== null) {
In my case I want a POST when using the form url+callback. Thus I'd like to suggest adding a fourth parameter to specify POST/GET.
Alternately, I totally misread the code, and my assumptions fall to the ground in a cloud of dusty lines of code. :)
~ ~ Dave
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/