Bil and Chris, Thanks to both of you. Chris's code is exactly what I wanted, and Bil, the XHR memory leaks still happen. Some old stuff thrown up by Google indicates that only 2 simultaneous XHR sessions can be initiated, and the next one waits till either of the two closes.
Regards On Jun 29, 8:18 am, "chris thatcher" <[EMAIL PROTECTED]> wrote: > Hi Sid, > > The really important thing is that you'll need to 'hijax' the form and make > sure you provent the default behavior of the browser. jQuery makes this > terribly easy. > > jQuery("#myform").bind('submit', function(event){ > //stops browser from submitting the form > //and redirecting. > event.preventDefault(); > //use jquery form plugin to submit via ajax here or do it by hand > > }); > > Thatcher > > > > On Sat, Jun 28, 2008 at 10:59 PM, Bil Corry <[EMAIL PROTECTED]> wrote: > > > Sid wrote on 6/28/2008 8:31 PM: > > >> What I basically want to achieve is that on clicking the submit > >> button, the data is posted to the php file without any noticeable > >> difference happening to my page. The response etc will be taken care > >> of by my code. Any ideas? > > > If you submit the request via XHR, then the page can remain the same (with > > the div refreshed) while the data is sent to the server. Just note that if > > your site is entirely driven from a single page using XHR, then I hear you > > should be careful of memory leaks; not sure how relevant that advice is > > anymore with the newer browsers. > > > - Bil > > -- > Christopher Thatcher