views:

21

answers:

1

hi,

how i can assign rjs prompt value to a variable

page << "prompt('Enter the new first name:');"

when i call in alert

+1  A: 

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.

nfm
thanks its workig
nirmal