<%= form_remote_tag :url => {:action => 'comment', :id => @article}, :position => :bottom, :update => {:success => 'commentList'}, :loading => "loading()", :complete => "complete(request)", :failure => "failure(request)", :html => {:id => 'commentform', :class => 'comments' } %>
Comments

<%= submit_to_remote('preview', 'Preview!', :update => 'preview', :complete => "Element.show('preview')", :url => { :action => 'comment_preview' }) %> <%= submit_tag 'Submit', :id => 'form-submit-button', :onclick => "$('commentform').onsubmit();this.disabled=true;Element.hide('preview');return false;" %> <%= image_tag '/images/theme/spinner.gif', :id => 'comment_loading', :style => 'display:none' %>

<%= end_form_tag %>