[jQuery] Re: JQuery populating div with AJAX

2007-08-10 Thread Benjamin Sterling
Steve, My bad, I knew load() would have suited you better, my brain just likes to think in the hardest way possible. :) Your code looks good. On 8/10/07, Steve Finkelstein <[EMAIL PROTECTED]> wrote: > > Hi! > > Thanks so much for the reply. > > This was the final set of code that I used that work

[jQuery] Re: JQuery populating div with AJAX

2007-08-10 Thread Steve Finkelstein
Hi! Thanks so much for the reply. This was the final set of code that I used that worked great for me: $(document).ready(function() { $('.pendingUsers').load('foo.php'); setInterval(function() { $('.pendingUsers').load('foo.php'); }, 30); }); The first load is to inject

[jQuery] Re: JQuery populating div with AJAX

2007-08-10 Thread [EMAIL PROTECTED]
Hi Steve, What about this example? $('#div-id').load('url.php'); More info can be found here: http://docs.jquery.com/Ajax#load.28_url.2C_params.2C_callback_.29 Good luck! Rick

[jQuery] Re: JQuery populating div with AJAX

2007-08-10 Thread Benjamin Sterling
Either way you should wrap it in a $(document).ready, but you can put the ajax call into it's own function and call in in the setInterval. On 8/10/07, Steve Finkelstein <[EMAIL PROTECTED]> wrote: > > Benjamin, > > Thank you kindly again. > > One last inquiry. Do I pop that into a separate script?

[jQuery] Re: JQuery populating div with AJAX

2007-08-10 Thread Steve Finkelstein
Benjamin, Thank you kindly again. One last inquiry. Do I pop that into a separate script? Possible just throw it inside of a $(document).ready() wrapper? On 8/10/07, Benjamin Sterling <[EMAIL PROTECTED]> wrote: > > Not entirely sure what you are saying but you can do something like: > > setInter

[jQuery] Re: JQuery populating div with AJAX

2007-08-10 Thread Benjamin Sterling
Not entirely sure what you are saying but you can do something like: setInterval(function(){ $.ajax({ type: "POST", url: "some.php", success: function(msg){ $('myDiv).text(msg); } }); }, 1000); On 8/10/07, Steve Finkelstein <[EMAIL PROTECTED]> wrote: > > Benjamin, > > I believe you

[jQuery] Re: JQuery populating div with AJAX

2007-08-10 Thread Steve Finkelstein
Benjamin, I believe you understood properly, yes! I'm not sending the server any information, just receiving back information from a database which is influenced from other sources, not this application. I'll have to lookup SetInterval syntax, thanks for the pointer. Is it wise to try the excerp

[jQuery] Re: JQuery populating div with AJAX

2007-08-10 Thread Benjamin Sterling
Steve, You ultimately don't need to send params to the server side page, you will just need to account for the returned information. $.ajax({ type: "POST", url: "some.php", success: function(msg){ alert( "Data Saved: " + msg ); } }); the success is where you would put your function to