no, it doesn't work

but I have found another solution

with

var_name=$(this).get(0);

$.ajax(options) // ... now I can access var_name


thank you ;)

On 9 Nov., 15:33, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
> have you tried
>
> $("a").ajax(options);
>
> });
>
> ? Seems to me like that should work.
>
> -----Original Message-----
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of alife
> Sent: Friday, November 09, 2007 8:17 AM
> To: jQuery (English)
> Subject: [jQuery] chainable ajax() - request
>
> hello!
>
> I want to use the ajax() - method without losing the actual clicked object.
> do you have a solution for my problem?
>
> To give an example:
>
> ------------------------------------
>
> $("a").click(function(){
>
> // now I have the possibility to use load, but I need the ajax - method,
> because I don't want to add anything into the clicked object, I want to load
> a script...
>
> $(this).load("ajax.php", {var = lala} , function(){...}); // ... with this
> method I could get "this"
>
> /*
> $.ajax({
>                         type:           "POST",
>                         url:            "ajax.php",
>                         data:           "var=lala",
>                         dataType:       "script",
>                         success: function(msg){
>                         alert( this );
>   });
>
> //with this method I lose "this", and can't access the clicked objects
>
> what I'd need is
>
> $("a").ajax(options);
>
> });
> ------------------------------------
>
> Do you understand my problem?
>
> Thank you for your help,
> alife

Reply via email to