Hi
In the view I have link_to_remote as below
<%= link_to_remote( “Select”,
{
:update=>“div_inside_transfer_reason_search_sd”,
:before=>“checkgroupselected($(‘sd_ticket_primary_assignee_group_id’));”,
:url =>{ :controller => ‘popup’, :action =>
‘transfer_reason’,:sd_ticket=>sd_ticket,},
:with =>"‘transfer_reason=’+$(‘transfer_reason’+#{div_no}).value ‘&’ +
‘primary_group_id=’+$(‘sd_ticket_primary_assignee_group_id’).value",
}) %>
in the :before i am calling the javascript to check whether the value
sd_ticket_primary_assignee_group_id is empty or not…What i need is if
that field is not empty only controle goes to the action
transfer_reason…Otherwise that is if it is empty I have to show a
hidden div…And i tried javascript like
But is not working…What may be the reason?Also is there any other
method as a solution?
Thanks in advance
Sijo