The example from jQuery document is

$.ajax({ data: myData });

and this does not work for 1.2.5 onwards.
Does this works work on your side?

2008/9/22 Jörn Zaefferer <[EMAIL PROTECTED]>:
> Making variables private is easy:
>
> (function() {
>  var privateVar;
>  ...
> })();
>
> You'll find that used by any jQuery plugin.
>
> The jQuery documentation most likely referred to the data-option for
> $.ajax: $.ajaxSetup({
>  data: {
>    mydata: "xyz"
>  }
> });
>
> Passing random stuff to $.ajaxSetup doesn't make any sense.
>
> Jörn
>
> On Sun, Sep 21, 2008 at 6:34 PM, sui-sing Lai <[EMAIL PROTECTED]> wrote:
>>
>> I know I can use a "global" variable. But.... I don't think is good to
>> discuss toward that direction....
>> Ok, the jQuery document state that I can pass "{mydata : xyz}" to
>> XMLHttpRequest object.
>> What I found is that the code I shown before work with jQuery 1.2.3 to
>> 1.2.4 but it does not work with 1.2.5 and 1.2.6.
>> Any idea? Is it tested for the case of 1.2.5 and 6?
>>
>> sglai
>>
>>
>> 2008/9/21 Jörn Zaefferer <[EMAIL PROTECTED]>:
>>> No, that still doesn't make a lot of sense. Though it looks like what
>>> you actually want is something like this:
>>>
>>> var mydata = {};
>>> $.ajax({
>>>  success: function() {  mydata.status = 200; }
>>> });
>>>
>>> Jörn
>>>
>>> On Sun, Sep 21, 2008 at 4:26 PM, sui-sing Lai <[EMAIL PROTECTED]> wrote:
>>>>
>>>> ok, I tried to pass "this" object to ajax callback.
>>>> I refer to jQuery doc and find out that I can pass it to via
>>>> $.ajaxSetup( { mydata : this } ).
>>>> code go like this:
>>>>
>>>> var myObj = function() {
>>>>  $.ajaxSetup({mydata:this});
>>>>  $.ajax({
>>>>    ....
>>>>    success:function(xml){ this.mydata.status = 200}
>>>>  }
>>>> }
>>>>
>>>> Hope this is better.
>>>>
>>>> Thanks,
>>>> sglai
>>>>
>>>> 2008/9/21 Jörn Zaefferer <[EMAIL PROTECTED]>:
>>>>> Could you be more specific about the actual issue?
>>>>> $.ajaxSetup({mydata:this}) doesn't make much sense.
>>>>>
>>>>> Jörn
>>>>>
>>>>> On Sun, Sep 21, 2008 at 10:58 AM, sglai <[EMAIL PROTECTED]> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Happen to find this problem. Does release test case cover this?
>>>>>>
>>>>>> Regards,
>>>>>> sglai
>>>>>>
>>>>>> >
>>>>>>
>>>>>
>>>>> >
>>>>>
>>>>
>>>> >
>>>>
>>>
>>> >
>>>
>>
>> >
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to