As you can see there are 2 Buttons 'Select'.When i click on the
first select a search UI comes in the modal window and the result of
search is shown on the same popup window.And when i click on one record
in the window its value will be set on the text field by javascript and
its id goet to the hiddenfield.
<%= hidden_field “sd_ticket”, “primary_assignee_group_id” %>
So my problem is when i click on the second select how can i get this
value…I tried like
<%= puts $(‘sd_ticket_primary_assignee_group_id’).value %> But
getting error.
value…I tried like
<%= puts $(‘sd_ticket_primary_assignee_group_id’).value %> But
getting error.
Think about that: you’re trying to write some ruby code (ie that runs
on the server) to access something that exists only on the browser.
That can’t possibly ever work. In a chunk of javascript $F(‘some_id’)
will evaluate to the value of that input, $(‘some_id’).setValue(123)
sets the value.