Topic: Creating Progress Bar

Hi, i've this code in app/views/books/_form.html.erb :

<%= form_for @book, :html => { :multipart => true } do |f| %>
  <% if @book.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@book.errors.count, "error") %> prohibited this book from being saved:</h2>

      <ul>
      <% @book.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :title %><br />
    <%= f.text_field :title %>
  </div>
  <div class="field">
    <%= f.label :description %><br />
    <%= f.text_area :description %>
  </div>
  <div class="field" id="testing">
    <%= progress_bar(33, :rounded => true) %>
    <%= f.file_field :file %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>

Any idea for changing 33 value on progress bar to a dynamic value using javascript? dependent on the progress of uploading files..

Last edited by yogahapriana (2012-06-13 03:23:59)