Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6936529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:14:42+00:00 2026-05-27T12:14:42+00:00

I am working on an app that have this code on a view file

  • 0

I am working on an app that have this code on a view file

<%= form_for @car, :html => { :method => :put }, :html => { :multipart => true } do |f| %>
   <h3 id="photos_count"><%= pluralize(@car.uploads.size, "Photo")%></h3>
   <div style="margin:10px 0 50px 0;float:left;width:700px;">
      <%= f.submit "Delete selected photos" %>
   </div>
   <div style="width:500px !important;">
     <%= f.fields_for :uploads do |photo_fields| %>
       <%unless photo_fields.object.new_record? %>
         <div style="width:150px;float:left;">
           <%= image_tag(photo_fields.object.photo.url(:thumb)) %>
           <p><%= photo_fields.check_box :_destroy %>  Delete item</p>
          </div>
       <% end %>
      <% end %>
    </div>
<% end %>

that generates a form with photos for cars that I can select one by one and then press Delete selected photo to delete them.

I need a select all check box or link at least.
I’ve google it and found solutions on how to do it, the reason why I can’t test it is cause I am way too far from the working machine and I got the mail from the client to solve this asap.
I could not get how this things work.
I am online with the staff members from the server where the app is running and I just need the solution to give them.

the form generated by this code:
http://pastie.org/3013008

P.S. again, I would try to do this on my own but I am not on my working machine and I am on Windows platform on this one.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:14:43+00:00Added an answer on May 27, 2026 at 12:14 pm

    To select a checkbox via jquery, you change the checked property

    $("input[type='checkbox']").prop("checked", true);
    

    That will check all the input of type checkbox.
    Depending on your situation, you might wanna change the selector

    Now all u have to do is to bind this code to a link or a checkbox.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fantasy football league rails app that was working last year and
I have a DataGridView control in a winforms app that I'm working on. The
We have an ASP.NET 2.0 WebForms app that uses MS Ajax 1.0. It's working
In an app I'm working on, I have a plain style UITableView that can
I'm working on a very simple iPhone app, that in the end will have
In some code I'm working on I have noticed that several variables are being
So here I have this first time app I'm working on. When I run
I am working on an app that has a navigation view controller in a
I am working with iPhone app(LandscapeRight Mode), I have added a Image view named
I have an iphone app that uses table view as the interface. Each time

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.