This line is your problem:
$(this).fadeOut(700);
"this" is the window object in your success callback. Try changing
that line to:
$('#myForm').fadeOut(700);
ASD1 should not alert since it is in the wrong branch of the conditional.
ASD2 and ASD3 do not alert because an exception was thrown.
Mike
On 8/13/07, firstlor <[EMAIL PROTECTED]> wrote:
>
> hello,
>
> I have a big problem using jquery and ajax. I have the following code:
> http://pastebin.com/m2ab384c1 !
> I submit a form and an ajax request is sent. if the site the request
> is sent to outputs '-1|X', than it's an error with X as error msg, if
> it's 1, it was successfull!
> Now I tried to enter validation code wrong and I get the error, that
> it was wrong ... the form isn't hidden so I can try again! When trying
> again and again with wrong code, I get always this error msg (so far,
> that's how it should be) ...
>
> If than I enter the right code, the alert(msg) is executed, I get
> '1' (so I think it should go into the else-block and display msg of
> success), 'ASDx' is also alerted, but than 'ASD1', 'ASD2' and 'ASD3'
> are not alerted (I dunno why ... even if no block of if-else is being
> executed, it should alert 'ASD3' ...), and I get the 3 alerts from the
> 'error' handler ... the third parameter says: "Type Error: e.style has
> no property" ...
>
> I don't understand this.
> Can you help me? Thanks!
>
> p.s.: I have jquery 1.3.1.1 and jquery form plugin!
>
>