Disclosure: I know nothing about web programming
Background to problem: I have an environmental testing chamber testing embedded computers at various temperatures. It is controlled by a windows application. I can control the chamber via ruby and the Win32API interface of the control application. The chamber is far from my office and I would remotely monitor the state and trigger a change via a Web interface. Sinatra makes it easy to show the state via a web server.
My problem: I want to click on a button on the status webpage and send a command via Sinatra and Ruby to the application without switching to a different page. I cant find any examples or information for something like that.
The Answer: You can use Ajax(as in the accepted answer) but I am going with post and reload the page. It is a lot simpler but not as smooth.