"+"Retrieving data from PubChem. This may take some time, please be patient."+"");
$.ajax({
cache: true,
url: uri,
//timeout: 120000;
success: function(data){
data = "
"+title+"
"+"" + 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."+"");
$.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