views:

61

answers:

1

I am getting information from the browser using Javascript / HTML5 that I want to pass back into Sinatra and Ruby.

How can I pass this information back into Sinatra so that I can use it in other parts of my code?

+1  A: 

If you want to pass any information from the client-side (JavaScript) to the server-side (Sinatra), you need to use AJAX or something like Comet. You should serialize, encode your data, send it using XMLHttpRequest and handle in the server-side code. After that, you may return an answer to your client-side.

floatless