in a model popup receiving a variable as question type id as '$('#subquestion').val()' based on this value the model popup content have to create,
model popup receiving the value but based on this
<%@lg = Language.all %>
<% @qs_type = Question.find( **javascript value** ).question_type %>
<% @lg.each do |n| %>
if ( @qs_type == 11)
matchingtype question two textbox
<%= text_area %>
<%= text_area %>
elsif @qs_type == 3
mutiple choice one textbox.
<%= text_area %>
<% end %>
is there any way to do this ? whether the RJS will help ?