oh... the idea of inconsistency is from the fact that my code run on
1.2.4 but not 1.2.5 onward.
2008/9/23 sui-sing Lai <[EMAIL PROTECTED]>:
> I believe ether way is fine as long as it is consistent across version.
> You see all I need is a way to pass my data to all the
> XMLHttpRequest's callbacks.
>
> 2008/9/23 Jörn Zaefferer <[EMAIL PROTECTED]>:
>> I don't know where you got the idea that versions before 1.2.5 did
>> that. $.ajaxSetup hasn't been touched for a long time.
>>
>> jörn
>>
>> On Mon, Sep 22, 2008 at 6:56 PM, sui-sing Lai <[EMAIL PROTECTED]> wrote:
>>>
>>> so the fact that parameters "a, b, c ..." are accepted by the version
>>> before 1.2.5 is actually a bug?
>>>
>>> 2008/9/22 Jörn Zaefferer <[EMAIL PROTECTED]>:
>>>> "data" is an option for $.ajax, like url. You can use ajaxSetup to set
>>>> defaults without explicitly specifiying them every time you call
>>>> $.ajax. $.ajaxSetup does NOT accept arbitrary parameters like a, b or
>>>> c. That doesn't make any sense at all.
>>>>
>>>> Jörn
>>>>
>>>> On Mon, Sep 22, 2008 at 2:39 PM, sui-sing Lai <[EMAIL PROTECTED]> wrote:
>>>>>
>>>>> btw, to test the case of "this" object, maybe we can check the
>>>>> constructor of the "this" is what we expected.
>>>>>
>>>>> 2008/9/22 sui-sing Lai <[EMAIL PROTECTED]>:
>>>>>> for the test case, maybe is good to pass in different datatype in
>>>>>> $.ajaxSetup();
>>>>>> e.g.
>>>>>>
>>>>>> $.ajaxSetup({ a : null, b:123, c:new Object(), d:"this is a test",
>>>>>> f:this, g:true, .... etc}
>>>>>>
>>>>>> ~ sglai
>>>>>>
>>>>>> 2008/9/22 Ariel Flesler <[EMAIL PROTECTED]>:
>>>>>>>
>>>>>>> Can you provide a test case ? thanks.
>>>>>>>
>>>>>>> --
>>>>>>> Ariel Flesler
>>>>>>> http://flesler.blogspot.com/
>>>>>>>
>>>>>>> On Sep 21, 11:26 am, "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
-~----------~----~----~----~------~----~------~--~---