I have a file "index.js.rjs" where i only want to run the code in it
(which updates the contents of a div in typical ajax style) if a
variable i have from params is the same as a value of one of the form
fields on the page (which has the id 'search_timestamp'). I can't work
out, though, how to get that value in my js.rjs file. Something like
if @timestamp.to_s == page['search_timestamp'].val()
I feel like this should be easy but can't figure it out. Can anyone
show me how? I've tried just using page.call with some jquery but again
can't work out how to get the resultant value back into my ruby code.
I'm using jquery and jrails in my app in case that's relevant.