Perfect! Thank you very much! :)
-jj. On 30 déc, 17:20, Joe <joseph.is...@gmail.com> wrote: > Hey JJ, > > After the delete.php?id="X" is loaded and completed, do you then want > the display.php to be loaded? If so, place it in a callback function > so it will be completed after delete.php has completed/sent a > response. > > $(document).ready(function(){ > $("a.test").livequery("click",function(event){ > var id = $(this).attr('id').substr(1); > $("div#status").html('<img name="wait" src="wait.jpg" />'); > > $("div#status").load("delete.php?id=" + id, function(){ > $("div#display").load("display.php"); > }); > return false; > }); > > }); > > The way you currently have your code written will load display.php > immediately after delete.php?... is executed. If I'm understanding > you correctly, you want it to load AFTER delete.php has run its > course. Is this what you intended? > > Cheers. > > Joe > > http://www.subprint.com > > On Dec 30, 10:14 am, jjshell <blahblahcoui...@gmail.com> wrote: > > > > > Hi, > > > Please consider the code below: > > > $(document).ready(function(){ > > $("div#display").load("display.php"); > > > }); > > > $(document).ready(function(){ > > $("a.test").livequery("click",function(event){ > > var id = $(this).attr('id').substr(1); > > $("div#status").html('<img name="wait" src="wait.jpg" />'); > > $("div#status").load("delete.php?id=" + id); > > $("div#display").load("display.php"); > > return false; > > }); > > > }); > > > display.php is loaded with the document and injected into the dom (the > > first time the page is loaded, that is). Then when a link with > > class .test is clicked, a deletion process is triggered (delete.php, > > which outputs a process status), and the display.php page should be > > reloaded and re-injected into the dom, with updated results. > > > The reload of display.php after a .test click is quirky. Sometimes it > > works, sometimes it doesn't. > > > Any idea why? > > > Regards, > > > -jj. :)- Masquer le texte des messages précédents - > > - Afficher le texte des messages précédents -