Is your selector correct for your success function?

perhaps you meant $("#loading") instead of $("loading")  ?

cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-276-206-8393
E-mail:  mjlaw...@us.ibm.com

'When seen from outer space, our beautiful blue planet has no national
boundaries.'

http://www.givesmehope.com/


                                                                       
  From:       idcoder <idrishlaxmid...@gmail.com>                      
                                                                       
  To:         "jQuery (English)" <jquery-en@googlegroups.com>          
                                                                       
  Date:       12/17/2009 08:15 AM                                      
                                                                       
  Subject:    [jQuery] ajax                                            
                                                                       





i am trying to submit a form using jquery and ajax. The form gets
submitted without going to the url through ajax and values are entered
successfully in DB if all entries are correct and validated. also it
does not updated the DB if any errors.

here is the javascript

$(document).ready(function(){

             $('#regist').submit(function(e) {

                         $.ajax({
                         type: "POST",
                         url: "submit1.php",
                         data: $('#regist').serialize(),
                         dataType: "json",
                         success: function(){
                                     $("loading").append("<img
id='checkmark' src='images/check.png' /
>");
                                     }
             });
                         return false;
                         e.preventDefault();

             });

});

But i cannot work out the success event in ajax..anything i insert
into success event does not work...any help would be
appreciated..thanks

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

Reply via email to