there is
page.replace_html "id", thing to replace it with
but is there something where I can just insert a value into a text field?
there is
page.replace_html "id", thing to replace it with
but is there something where I can just insert a value into a text field?
I think you'll need to drop out of RJS and into Prototype for this one. For example, if your textfield
id has a value "foo" then something like this might work:
page << %{
var input = $('foo');
input.writeAttribute('value', 'thing to replace it with');
}
updates the value
attribute of the input
element.
The way I found was to do this:
page[:object_column_name].value = whatever
its just the id of the field