[jQuery] ajax success event does not work
Hi, Can anyone explain me what does success function arguments contain..for ajax jquery.. I read the following in the documentation success -> Function A function to be called if the request succeeds. The function gets passed two arguments: The data returned from the server, formatted according to the 'dataType' parameter, and a string describing the status. This is an Ajax Event. function (data, textStatus) { // data could be xmlDoc, jsonObj, html, text, etc... this; // the options for this ajax request } "i want to know what is the data and textStatus" I have this code here : $(document).ready(function(){ $("form#regist").submit(function() { var str = $("#regist").serialize(); $.ajax({ type: "POST", url: "submit1.php", data: $("#regist").serialize(), dataType: "json", success: function(){ $("#loading").append("you are here"); } }); return false; }); }); the success part does not work.. i can enter the data into the DB if all fields entered are correct..However if something is wrong then nothing happens. Can anyone guide me where i am going wrong..Thanks a lot..
[jQuery] Re: ajax
Hey thanks for a reply... I corrected the selector as pointed by you..But is still cannot make anything inside success work.. On Dec 17, 5:18 am, Michael Lawson wrote: > 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 > > > To: "jQuery (English)" > > > 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(" 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 > > graycol.gif > < 1KViewDownload > > ecblank.gif > < 1KViewDownload
[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(""); } }); 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
[jQuery] Re: cycle plugin pager - get started..
ok i got it working. I was wondering if it is possible to change the nav links caption, or put some other image, not the source image but image of our choicethanks On May 7, 1:46 pm, idrish laxmidhar wrote: > hi. i am interested in using the cycle plugin and i dnt know how to get > started.http://www.malsup.com/jquery/cycle/pager10.html > > i want to use this plugin. > > Now i dnt know how to get the nav links > > when i checkd the source there is only a *div id="nav"* but nothing in > it..when i checked using firebug the li appears. How do i get started. > The basic, simple cycle plugin works perfectly, but for this pager demo i > dnt know how to get the nav working. > > thanks a lot > > -- > BEST WISHES. > > I |) r I & |-|
[jQuery] image changes when mouse over a link
I am looking for a effect. There are 3 images and 3 links at the bottom. when mouse over a link should change the image. I tried all the possible searches but could not get the desired tutorial. any help?? thanks..