www.webdeveloper.com
Results 1 to 15 of 15

Thread: Need to restrict a user to check consecutive checkboxes inside each Inner Table

Threaded View

  1. #1
    Join Date
    Feb 2009
    Posts
    95

    Need to restrict a user to check consecutive checkboxes inside each Inner Table

    I have a table (id=’MainTable’) where I am displaying availability records and inside the Main Table I have a table with checkboxes for the available time. The checkboxes in the Inner Table will be different in number and there will 1 or more than 1 checkboxes for each record in a table. e.g the Inner Table of first line can have 5 checkboxes and can have 3 checkboxes for the second line and so on.

    A user can check 1 or more than 1 checkboxes of a specific line of Inner Table but in a sequence/consecutive to book an assessor for more than 1 hour.

    E.g In the first line a user can select either a checkbox with “08:00 AM - 09:00 AM” and “09:00 AM - 10:00 AM” to make 2 hours but can’t select “08:00 AM - 09:00 AM” and “12:00 PM - 01:00 PM” to make 2 hours because they are not consecutive checkboxes.

    E.g In the second line a user can select either a checkbox with “09:30 AM - 10:30 AM” and “10:30 AM - 11:30 AM” to make 2 hours but can’t select “09:30 AM - 10:30 AM” and “05:00 PM - 06:00 PM” to make 2 hours because they are not consecutive checkboxes.

    I have a different id for the Inner Table

    I am only providing HTML of the Inner Table:

    Code:
    <table width="100%" border="0" id="Tab_13322918">
    <tbody>
        <tr>
            <td style="font-size:10px;color:brown">
                <input type="checkbox" value="08:00 AM - 09:00 AM"> 08:00 AM - 09:00 AM
            </td>
            <td style="font-size:10px;color:brown">
                <input type="checkbox" value="09:00 AM - 10:00 AM"> 09:00 AM - 10:00 AM
            </td>
        </tr>
        <tr>
            <td style="font-size:10px;color:brown">
                <input type="checkbox" value="12:00 PM - 01:00 PM"> 12:00 PM - 01:00 PM
            </td>
            <td style="font-size:10px;color:brown">
                <input type="checkbox" value="01:00 PM - 02:00 PM"> 01:00 PM - 02:00 PM
            </td>
        </tr>
        <tr>
            <td style="font-size:10px;color:brown">
                <input type="checkbox" value="02:00 PM - 03:00 PM"> 02:00 PM - 03:00 PM
            </td>
        </tr>
    </tbody>
    Please see pic for more info.Attachment 15741
    Attached Images Attached Images

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles