Getting another dom element value

Hi
I have a code in view like below…Here I am using Control.modl
windows

Primary Assignee Group <%= text_field "dummy_service_desk_ticket", "dummy_primary_assignee_group", "size" => 30, :readonly => "readonly" %> Select Assignee <%= text_field "sd_ticket", "primary_assignee", "size" => 30, :readonly => "readonly" %> Select
 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.

Sijo

On 27 May 2008, at 10:43, Sijo Kg wrote:

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.

Fred


My ramblings: http://www.spacevatican.org