Topic: Pass JS return value to partial?
Within my view I would like to call a JS function which returns a value that I can then pass to a partial. Can't figure out how to do this or even if you can. Any suggestions? Thanks in advance.
Example ( assume ../views/foo/show.html.erb):
...
<script language="JavaScript">
function foo(){
return 5;
}
</script>
<%= render partial => "my_partial", locals => {:ref_no => javascript_tag "foo()"} %>
...