Hi,
I need to display the current selection for select table as a pop up box , where in index.rhtml I have this
<SCRIPT LANGUAGE="JavaScript">
function checkData()
{
var myTest = formid.table_id.options[formid.table_id.selectedIndex].value;
alert 'myTest';
}
</script>
<% form_tag :controller => 'project_controller', :action => 'actionfor_menu', :id=>'formid' do %>
<p>
<select id="table_id" name="table_id" size="9">
<%= options_from_collection_for_select(@monitors, 'id', 'name', @monitors.first.id) %>
</select>
</p>
<% end %>
However, everytime I change the selection, nothing happens, and I don't see any errors/warning. Is there any additional lines that I have to add in the checkData function to show the current value of selection box?
Thank you