Hard to tell, since you haven't said what it is doing or what you're "expecting" it to do, but I think data should be {oname:name}

Maybe that's what's wrong ?

You'll also need a return false to prevent the standard form submit from kicking in




brightdad...@googlemail.com wrote:
Hi Experts,

I am trying to do something like this;

  $("form#submit").submit(function(){
        var name     = $('#name').attr('value');
        var $out = $("#message");

        //Send the request
        $.ajax({
            type: "POST",
            url: "post.php",
            data: "oname="+name,
            complete: function(data){
                $out.html(data.responseText);

                if(($out).filter(':contains(Invalid)'))
                {
                    $out.fadeIn();
                    $(".txtHint:visible").slideDown("slow");
                    $(".client").hide();
                }else if($out).filter(':contains(successfull)')){
                  $out.fadeIn();
               }
to be able to determine what to hide and display depending on the
result recieved from the query.
This doesnt not behave as exoected - do any know  exactkly what i am
doing wrong here?
------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG - www.avg.com Version: 8.0.237 / Virus Database: 270.11.9/1993 - Release Date: 03/10/09 07:19:00


Reply via email to