David Mintz wrote:
For you guys, does the X in AJAX really stand for XML? Or are you sending
back finished HTML?
Finished HTML.
On the PHP side we send back a big string, composed of object IDs and
innerHTML values. Delimiters are pipe and a pipe-star-pipe, like the
following:
object_1|<span class="notice">Everything worked great!</span>
|-|
object_2|<table><tr>.....
|-|
object_3|<select><option>....
The browser side cuts it up and assigns the innerHTML.
We can also send alerts back for debugging, like this:
echo|This text will appear in an alert
and finally if there is no pipe symbol in the return, the js assumes
something is very wrong and displays the HTML in an alert. It does the
same thing if the named object does not exist.
begin:vcard
fn:Kenneth Downs
n:Downs;Kenneth
adr;dom:;;347 Main Street;East Setauket;NY;11733
email;internet:[EMAIL PROTECTED]
tel;work:631-689-7200
tel;fax:631-689-0527
tel;cell:631-379-0010
x-mozilla-html:FALSE
url:http://www.secdat.com
version:2.1
end:vcard
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php