Aditya R. wrote:
store this value into a rails variable?
This is something that can be faked, but fundamentally the problem is
is executed in the server. So, the server takes an RHTML page, executes
all of the Ruby code to fill in the dynamic stuff on the page, and ships
of the Ruby code is gone - it was already executed.
because the ruby execution happens first:
var jsVariable = “<%=rubyvariable%>”
the only real option you have is to send it in a form (or querystring)
back to the server - either via an AJAX request or a regular form
Hope it helps,