In a view I have a script (javascript) that declares a variable after some deep processing. How can I use that variable outside the script boundaries in the same view page?
some_view.html.erb
<script>var seq = Sortable.sequence('list');</script>
# How to do this? Is it possible?
<%= sortable_element "list",
:update => "order",
:complete=> visual_effect(:highlight, "list"),
:scroll => 'list',
:url=>{:action=>"order", :order_init => seq} %>
Thank you!