Thanks Guys for the Help... I hope I can return the favor soon!

Joe

On Mar 24, 3:06 pm, "Dan Dorman" <[EMAIL PROTECTED]> wrote:
> On Mon, Mar 24, 2008 at 12:32 PM, Joey H <[EMAIL PROTECTED]> wrote:
> >  I Would
> >  like this code to update the value of the cust_city form field...
>
> >                         var ajax = new Ajax.Updater(
> >                                         {success: 'zipResult'},
> >                                         url,
> >                                         {method: 'post', parameters: 
> > params, onFailure: reportError}
> >                                 );
>
> In order to update a form element's value, you'll need to use
> Ajax.Request, _not_ Ajax.Updater; the latter works on a DOM element's
> contents, that is, the HTML elements inside another HTML element. The
> value of a form element, on the other hand, is set via its "value"
> attribute.
>
> So something more like this:
>
> new Ajax.Request(url, {
>   method: 'post',  // not necessary (POST's the default), but I'd use GET
>   parameters: params,
>   onSuccess: function(transport) {
>     $('cust_city').value = transport.responseText;
>   },
>   onFailure: reportError
>
> });
>
> :Dan
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to