Wednesday, July 1, 2009

[jQuery] Re: simple JSON parse problem!!!

So...am I to understand that jsonp provides a method by which an image can
be uploaded after submission of a form as part of a callback function?  I've done
some research on jsonp, but still am not clear about it.
 
Rick

On Wed, Jul 1, 2009 at 1:03 PM, Ricardo <ricardobeat@gmail.com> wrote:

that is called jsonp. You need to define a function named
uploadPicture that will get called when the response arrives. jQuery
handles that for you if you use the proper method (assuming the
callback name can be set in the request):

$.getJSON('uploadpicture.php?callback=?, {some:'data'}, function(data)
{
    alert(data.errors[0]);
});

http://docs.jquery.com/Ajax/jQuery.getJSON#urldatacallback

On Jul 1, 10:16 am, theozmanbo <b.k.osbo...@hotmail.com> wrote:
> Is it because of the uploadPicture part? Why isn't it valid? Sorry for all
> these stupid questions.
> --
> View this message in context:http://www.nabble.com/simple-JSON-parse-problem%21%21%21-tp24283450s2...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.




--
--------------------------------------------------------------------------------------------------------------------------------------------------
"Ninety percent of the politicians give the other ten percent a bad reputation."  Henry Kissinger

No comments: