Ok, maybe it was too much, hehe. Let me try to explain 1 the main function is submitValues, triggered when submitting a form 2 onSuccess, it triggers the function processResponse 3 processResponse handles showing the result message (succes or failure basically) and if succesful, it triggers the funciton complementar 4 complementar can do anything else, like updating a div or series of divs, deleting and adding rows, whatever you need. In order to do this, I needed to establish a way to return to the JavaScript what I want to do, so I decided I would use a set of messages like this: msg=(1,2)&txt=(text to display)&var|(html), where number=1 means success, 2 means error, text is what you want to show and var is HTML that will be used somewhere on the page. My philosophy is to create a series of functions, that trigger another function so its easier for me to update and debug and I can use it on other projects with no modifications.
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---