!!! 5 %html %head %meta{ :charset => "utf-8" } %title= "PubChem read across" %link{:rel=>'stylesheet', :href=>"#{'/style.css'}", :type => "text/css"} %script{:type => "text/javascript", :src => "/jquery-1.8.2.js"} :javascript $(document).ready(function() { $.ajax({ url: "/cid/#{@cid}/experiments", cache: true }); }); function show(title,element,uri) { $(element).html("

"+title+"

"+"Retrieving data from PubChem. This may take some time, please be patient."+"\"Searching"); $.ajax({ cache: true, url: uri, //timeout: 120000; success: function(data){ var slash = new RegExp("/","g"); data = "

"+title+"

"+" (csv)" + data; $(element).html(data); }, error: function(data,textStatus,message){ $(element).html(message); } }); } function hide(title,element,uri) { data = "

"+title+"

"+""; $(element).html(data); } function display(element,uri) { $(element).html("Retrieving data from PubChem. This may take some time, please be patient."+"\"Searching"); $.ajax({ cache: true, url: uri, //timeout: 120000; success: function(data){ $(element).html(data); }, error: function(data,textStatus,message){ $(element).html(message); } }); } %body %h1 PubChem read across %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" } %em This is an experimental version. Loading data from PubChem can be slow. Please use the "Back" button and retry the offending operation if you have timeout problems. = yield .footer %a{:href => 'http://www.in-silico.ch', :rel => "external"} in silico toxicology gmbh 2013