Found and patched the problem in ajax.js where $.getScript and
$.getJSON don't do anything if a callback isn't supplied.  The problem
is that httpData function isn't called from $.ajax unless there is a
callback supplied. Someone please commit if it's deemed a good fix.
The only other fix is to add an else after the check for s.success in
ajax.js on line 778 to look for types that need httpData to run.
Something like

// If a local callback was specified, fire it
if ( s.success )
    s.success( jQuery.httpData( xml, s.dataType ), status );
else if ( s.dataType=='script' || s.dataType=='json' )
    jQuery.httpData( xml, s.dataType );

But I think the patch below might be easier... up to you committers.

Index: ajax.js
===================================================================
--- ajax.js     (revision 603)
+++ ajax.js     (working copy)
@@ -420,11 +420,7 @@
         * @cat AJAX
         */
        getScript: function( url, callback ) {
-               if(callback)
-                       jQuery.get(url, null, callback, "script");
-               else {
-                       jQuery.get(url, null, null, "script");
-               }
+               jQuery.get(url, null, callback||function(){}, "script");
        },

        /**
@@ -465,7 +461,7 @@
         * @cat AJAX
         */
        getJSON: function( url, data, callback ) {
-               jQuery.get(url, data, callback, "json");
+               jQuery.get(url, data, callback||function(){}, "json");
        },

        /**


I'm still looking for the IE7 problem.

Paul


On 11/17/06, John Resig <[EMAIL PROTECTED]> wrote:
> I've created a trouble ticket for it here:
> http://jquery.com/dev/bugs/bug/407/
>
> --John
>
> On 11/17/06, Andrea Ercolino <[EMAIL PROTECTED]> wrote:
> >
> > Hi everybody.
> >
> > While developing the PunchCard widget I've found a problem with getScript in
> > IE7.
> >
> > If you are interested in helping me, I've isolated the issue here:
> > http://www.mondotondo.com/aercolino/punchcard/test-getScript-error/
> >
> > Thanks
> > Andrea
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to