> Effectively after uploading file we can't see any response in firebug.
> (You can see an example in the official website of jquery form 
> pluginhttp://malsup.com/jquery/form/#code-samples)


You won't see the response from a file upload displayed on the Firebug
console tab because that request does not use ajax.  You will see the
request/response on Firebug's "Net" tab however.


> And in the response i call a script with
> <script src="script.js" type="text/javascript"></script>
> My page get this file well but i have a javascript error on the "$" of
> $(document).ready(function() {...


This is due to the nature of how the file upload is performed.  As I
said, it does not use ajax, however it simulates ajax by performing a
native form submit and pointing the response to a dynamic iframe.  So
the response is actually received in a different document, and then
the form plugin extracts it and passes the response data to your
success handler.  That dynamic iframe document does not have direct
access to the jQuery $ fn.  One way around this, as is noted in the
documentation, is to return this response data inside a <textarea>
element (which the plugin knows how to handle).  Another way to handle
this is to embed you logic in the main document.

Reply via email to