[jQuery] Re: modify from server two jquery elements in the same time

2009-02-10 Thread Ryan
Well, if you HAD to stay HTML, you could split() the html. success: function(result){ var data1 = result.responseText.split([SPLIT CHARACTER]); etc ... you could use regular expressions, but json is so much more efficient.

[jQuery] Re: modify from server two jquery elements in the same time

2009-02-10 Thread phicarre
... You supposed that the elements have a text field ! I wrote this: On 10 fév, 12:11, phicarre wrote: > Thank you for your solutions. > Are we obliged to use jason ? Is it possible to stay "html" ? > > On 9 fév, 19:42, Ryan wrote: > > > What? Sorry, but this is hard to understand. I believe

[jQuery] Re: modify from server two jquery elements in the same time

2009-02-10 Thread phicarre
Thank you for your solutions. Are we obliged to use jason ? Is it possible to stay "html" ? On 9 fév, 19:42, Ryan wrote: > What? Sorry, but this is hard to understand. I believe you're trying > to set element data from a value in a php file, right? If so, that's > pretty easy using JSON. > > In

[jQuery] Re: modify from server two jquery elements in the same time

2009-02-09 Thread Ryan
What? Sorry, but this is hard to understand. I believe you're trying to set element data from a value in a php file, right? If so, that's pretty easy using JSON. In PHP, json_encode() converts an array or object into a string, and in Javascript it takes that string and converts it to an object. U

[jQuery] Re: modify from server two jquery elements in the same time

2009-02-09 Thread James
my_module.php 'hello', 'var2' => 'world' ); echo json_encode($myArray); ?> helloWorld.html $.ajax( { type: "POST", url:'my_module.php', dataType: 'json', //