I'm officially a Ruby on Rails contributor! Very cool.
Well, I thought I'd post an update. My changes were approved and merged into Rails' SVN. So, if you are using the latest-greatest code, then you can add a :position
symbol to form_remote_tag
or link_to_remote
with one of the following string values: before
, top
, bottom
, after
, replace
(default).
For my next idea... I was thinking of making the AJAX.Updater
a little smarter by having it check the type of element it's updating. It should be able to set the value of a form field, if it's the update target.
But that leads to some interesting questions. How do we handle different types of input elements? text
and textarea
are easy -- just set the value. What about checkboxes
, radiobuttons
, and listboxes
? It seems like you would be changing the selectable values for radiobuttons
and selectboxes
... And I have no idea what would change on a checkbox
. You could change the value, but why? You could have it selected or not, but why would you need AJAX for this?
Do you think as the contributor of this feature, that you could add it to the Rails docs in the javascript_helper page? As of now, the description of the :position option doesn't appear anywhere except on your site!
ReplyDeleteNice work with this, it's very cool, btw.
Yeah, I guess that might be nice, huh? ;-)
ReplyDeletepatch 933 can now fill in text fields by simply setting the value. I guess it needs more work, but it is already somewhat useful.
ReplyDelete