On Sat, Feb 14, 2009 at 18:47, joe t. <[email protected]> wrote:

> That said, i still wanted an alternative to having to make two
> function calls to serve the purpose of one.


That's why I suggested writing your own method. No one is suggesting that
you should write #serialize + Ajax.Request yourself more than once :)

The reason why I suggested to avoid #writeAttribute was not because this
function is unreliable (I appreciate the amount of work Tobie has put into
making read/writeAttribute robust accross browsers), but because it can bite
back in certain scenarios -- take this one for example:

   1. a user is filling out a form that submits to url A;
   2. at one point you want to validate the form with Ajax, so you use the
   writeAttribute-hacked #request method to submit serialized form to url B;
   3. at the end, user submits the form, but -- because of step #2 -- the
   form no longer points to url A and the form data gets lost.

Anyway, this is not a core discussion anymore, so I suggest you raise
further related questions on the spinoffs list.
Thank you,

# Mislav

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" 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-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to