Hi,
I have a text field with the id ‘list’
I am trying to add text to the field when a user clicks on a link with
this code
<%= link_to_function “#{item.name}”, update_page { |page|
page[:list][:value] += “#{item.name}”
} %>
but it fails.
a straight javascript function:
function addtext(text) {
list = document.getElementById(“list”);
list.value += text;
}
works so I am not sure what I am doing wrong.
Any ideas?
David.