On Aug 3, 2007, at 5:24 PM, [EMAIL PROTECTED] wrote:
> I hope I made myself clear.
Not really.
> I have a form that when user fills he will press submit button which
> have effect "onClick:previewMessage()". previewMessage() function is
> an Ajax.update function.
Use onSubmit, not onClick.
> I would like to know how can I get form data into other file which I'm
> accessing with AJAX?
RT[F]M. Or, use Form.serialize(). I think this is what you're
looking for:
Event.observe('myFormId', 'submit', function(evt) {
Ajax.Updater('someDivId', url, {
parameters: Form.serialize('myFormId', true);
}
});
http://prototypejs.org/api/form/serialize
http://prototypejs.org/api/ajax/updater
TAG
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---