Unobtrusive JavaScript Help?

Anyone using the Unobtrusive Javascript for Ruby On Rails Plugin?

I have some code that looks like this. I made external false so I could
look at the code generated.

<%= apply_behaviour ‘select:click’, :external => false do |page,
element, event|
x = element.value
page.insert_html :top, ‘the_list’, “

  • #{x}

  • end %>

    This generates the following:

    Any ideas on how I could get the value of x correct?

    Thanks,
    Mike