[jQuery] Re: How to refresh a single div with the data using .ajax

2009-08-18 Thread Charlie
ID's must be unique. Your animation will definitely choke on 2 the same ghost2008 wrote: Hey Charlie, this is pseudo, but they are exactly the same... Is this a problem? Thanks and regards

[jQuery] Re: How to refresh a single div with the data using .ajax

2009-08-18 Thread Liam Byrne
That looks like it's posting twice ? Any particular reason to do that ? L ghost2008 wrote: Hey guys, this is amazing. Thanks for your answers. I implemented the following: $.ajax({ type: "POST", url: "some.php", data: "name=test",

[jQuery] Re: How to refresh a single div with the data using .ajax

2009-08-18 Thread ghost2008
Hey Charlie, this is pseudo, but they are exactly the same... Is this a problem? Thanks and regards

[jQuery] Re: How to refresh a single div with the data using .ajax

2009-08-18 Thread Charlie
do the 2 divs really have same ID? the one being loaded and one loading into? I'm assuming this is pseudo code but just checking ghost2008 wrote: Hey guys, this is amazing. Thanks for your answers. I implemented the following: $.ajax({ type: "POST", url: "some.php", data:

[jQuery] Re: How to refresh a single div with the data using .ajax

2009-08-18 Thread ghost2008
Hey guys, this is amazing. Thanks for your answers. I implemented the following: $.ajax({ type: "POST", url: "some.php", data: "name=test", success: function(data){ $("#div").hide("slow");

[jQuery] Re: How to refresh a single div with the data using .ajax

2009-08-18 Thread Dhruva Sagar
You should then try to parse the 'data' and then get it from it.But in my opinion, you should add some additional post params to the post request, say such as {'data': ''#div'} and then in some.php you can conditionally only return the contents of the div you want instead of the complete 'data' Th

[jQuery] Re: How to refresh a single div with the data using .ajax

2009-08-18 Thread Charlie
$.load() lets you get specific elements only  like this $.load ("some.php #div) I have not done this with a full $.ajax but since they are using same jQuery,  in your $.ajax try url: some.php #div ghost2008 wrote: Hello there, I am not sure, if this works. I make a function call with t

[jQuery] Re: How to refresh a single div with the data using .ajax

2009-08-18 Thread anurag pal
Hi, Just implement the falg so that specific data will show into the div. For Example: $.ajax({ type: "POST", url: "some.php?ajx=1", data: "name=test", success: function(data){ $("#div").html(data);