Java: How to interact with ruby generated fields

Hello community,

I’m new to rubyonrails and to this Forum. I have to call 2 Fields,
generated by ruby, from a javafunction (onSubmit) but when I use this
example it didn’t work, why?

<%= start_form_tag({:action=> “show”}, { :onSubmit
=>“post[testfieldone].value=examplefunction(post[textfieldtwo].value+post[textfieldthree].value);”
}) %>

----snip

<%= hiddenfield_field “post”, “textfieldone”, :size => 20%>
<%= text_field “post”, “textfieldtwo”, :size => 20%>
<%= text_field “post”, “textfieldthree”, :size => 20%>

----snip

<%= end_form_tag %>

The Javascriptfunction couldn’t get the values of textfieldtwo and
textfieldthree.

Thanks for your help
Michael Herzog

OT: Please don’t call JavaScript “Java” :slight_smile:

Charles O Nutter wrote:

OT: Please don’t call JavaScript “Java” :slight_smile:

Sorry, my mistake! :frowning: