Hi,

On Nov 9, 8:34 pm, Victor <vkhomyac...@gmail.com> wrote:
> So you plan to receive JSON from server, then convert it to HTML and insert
> into page? HTML fragments are much easier in writing/validating/processing.

I am not so sure about this.
It really depends of what you want to do with the result from the
server.
If it is text/image and more or less static stuffs, you may return
HTML fragments, but if you plan to store/use those data for
computation, JSON return is definitely the best choice.
Also HTML fragments don't allow to do everything on all browsers
(things like inserting rows into an existing table or options into an
existing select tag for example are known to cause issues).

Like Richard said, templates are a good choice here too if your data
are often formatted in the same way.

Eric

-- 
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 prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to