On Tue, Nov 25, 2008 at 4:06 PM, Mahfoozur Rahman <[EMAIL PROTECTED]>wrote:
>
> thnx 4 da response. understood the code. um admired.
>
> Here let me also add one another thing, i.e. from the source fetcher
> file in this case results.htm suppose there two different outputs
> which are later going to be updated in two different divs in the
> caller script. um using php as server side language, lets suppose from
> the ajax fetcher file (results.php for php), there are two sets of
> output um representing as output1, output2. right? now after that one
> and only ajax call output1 is going 2 be updated in div1 and output2
> in div2.
>
> can this b possible?
>
> Can u give me some rings in this regard?
>
Yes. In one approach, you could delimit the data sets with some characters
like %DELIMITER% or so, and split the response string.
>>> var a = "foo%DELIMITER%bar"
>>> var b = a.split("%DELIMITER%")
>>> b
['foo','bar']
But the best way of doing this is sending back JSON[1]-formatted data to the
AJAX call. By default Ajax.Updater|Request evaluate those[2] and gives you
an object to work with.
You can find out how to work with JSON in PHP at the manual[3].
[1] http://www.json.org/
[2] http://www.prototype.org/learn/json (seems to be down at the moment)
[3] http://www.php.net/json
--
Gabriel Gilini
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---