RoR rjs assign prompt value to variable
how i can assign rjs prompt value to a variable
page开发者_如何学编程 << "prompt('Enter the new first name:');"
when i call in alert
Try just adding your assignment to your javascript statement:
page << "var response = prompt('Enter the new first name:');"
You should then be able to access the value of response
in your client side javascripts.
精彩评论