Listing 4. index.rhtml (Updated for JavaScript in the HTTP Response) Sample HTML page <%= javascript_include_tag 'prototype' %>

Headline

<%= submit_to_remote "submit-button", "Pig Latin it!", :url => { :action => "piglatin_sentence" }, :submit => "fakeForm" %>