:javascript function getsmiles() { if (document.JME.smiles() != '') { document.form.identifier.value = document.JME.smiles() ; } } .input %p Use this service to obtain predictions from OpenTox models. - unless @models.empty? %form{:name => "form", :action => url_for('/predict'), :method => "post", :enctype => "multipart/form-data" } %fieldset %legend Draw a compound %label   .jme %applet{:code => "JME.class", :name => "JME", :archive => "JME.jar", :width => "500", :height => "360"} %param{ :name => "options", :value => "polarnitro"} Please enable Java and JavaScript in your browser to use the JME editor. %span{:style=>"font-size:75%"} © %a{:href => 'http://www.molinspiration.com/jme/index.html', :rel => "external"} JME Editor courtesy of Peter Ertl, Novartis %br -# %label{:for => 'identifier'} or enter a Name, InChI, Smiles, CAS, ... %label{:for => 'identifier'} or enter a Smiles string %input{:type => 'text', :name => 'identifier', :id => 'identifier', :size => '60'} %br %fieldset %legend Choose one or more prediction models %br - endpoint = '' - @models.each do |model| -if model.endpoint != endpoint -endpoint = model.endpoint %b #{endpoint}: %br %input{:type => 'checkbox', :name => "selection[#{model.id}]", :value => true, :id => "model#{model.id}", :disabled => false} %label{:for => "model#{model.id}"} = model.name -#%input{:type => 'checkbox', :name => "selection[#{model.id}]", :value => true, :id => model.id, :disabled => !is_authorized(model.uri, "GET")} %br %br %input{:type => 'hidden', :name => 'subjectid', :id => 'subjectid', :value => session[:subjectid]} %input{ :type => "submit", :value => "Predict", :onclick => "getsmiles();"} = link_to 'Cancel', '/predict'