!!! 5 %html %head %script{:type => "text/javascript", :src => "jquery-1.8.2.js"} :javascript function display(element,uri) { $(element).html("\"Searching"); $.ajax({ cache: true, url: uri, success: function(data){ $(element).html(data); }, error: function(data,textStatus,message){ $(element).html(message); } }); } %body %h1 adverse outcome pathways %form{:name => "form", :action => '/search', :method => "GET"} %fieldset %label{:for => 'name'} Compound name: %input{:type => 'text', :name => 'name', :id => 'name'} %input{ :type => "submit", :value => "Search" } = yield