Advanced Search

Results 1 to 2 of 2

Thread: Table checkbox fields(javascript loop)

  1. #1
    Join Date
    May 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Table checkbox fields(javascript loop)

    Hi all ,

    I am newbie for JavaScript and i stack for this problem , I have table and inside my table i have a checkBox and button field each row
    and my problem now is how can i get tha value of selected row with only checkBox is checked ones is button "Release" is click . Somebody help me please. Please see my below HTML code for my exact example for my TABLE.

    HTML Code:
    <table id="Table1">
        <thead>
            <tr>
                <td align="center">
                    Vessel name
                </td>
                <td align="center">
                    Vessel Reg. No.
                </td>
                <td align="center">
                    BL No.
                </td>
                <td align="center">
                    Consignee name
                </td>
                <td align="center">
                    Broker name
                </td>
                <td align="center">
                </td>
                <td align="center">
                    Valid until
                </td>
            </tr>
        </thead>
        <tbody id="Tbody1">
           
            <tr>
                <td>
                    AMOY DREAM
                </td>
                <td>
                    V.025/CHU0003-13
                </td>
                <td>
                    025RZ07
                </td>
                <td>
                    STEEL TRUST CORPORATION
                </td>
                <td>
                    ELISA R. MANEBO
                </td>
                <td>
                    <input type="checkbox">
                </td>
                <td>
                    <input id="inputDate" type="text">
                </td>
                 <td>
                    <input id="btnRelease" value="Release" type="button">
                </td>
    
            </tr>
           
           
            <tr>
                <td>
                    BO SPRING
                </td>
                <td>
                    KYC0032-12
                </td>
                <td>
                    BSI1201KPOMNL007
                </td>
                <td>
                    MAXIMA STEEL MILLS CORPORATION
                </td>
                <td>
                    FELICITO SANTOS
                </td>
                <td>
                    <input type="checkbox">
                </td>
                <td>
                    <input id="inputDate" type="text">
                </td>
                 <td>
                    <input id="btnRelease" value="Release" type="button">
                </td>
    
            </tr>
               
            <tr>
                <td>
                    ESSEX STRAIT
                </td>
                <td>
                    DTT001-13
                </td>
                <td>
                    BSSBSMN0402
                </td>
                <td>
                    PAG-ASA STEEL WORKS INC.
                </td>
                <td>
                    PHILIP FALCON
                </td>
                <td>
                    <input type="checkbox">
                </td>
                <td>
                    <input id="inputDate" type="text">
                </td>
                 <td>
                    <input id="btnRelease" value="Release" type="button">
                </td>
            </tr>
              
            <tr>
                <td>
                    XIN HAI HE
                </td>
                <td>
                    SYI0001-13
                </td>
                <td>
                    XHHSM08
                </td>
                <td>
                    CARTER INDUSTRIAL CORP.
                </td>
                <td>
                    JOEL LIM
                </td>
                <td>
                    <input type="checkbox">
                </td>
                <td>
                    <input id="inputDate" type="text">
                </td>
                 <td>
                    <input id="btnRelease" value="Release" type="button">
                </td>
            </tr>
        </tbody>
    </table>
    
    Many thanks,
    r-a-l-p-h

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    27,636
    Thanks
    42
    Thanked 2,896 Times in 2,868 Posts
    Blog Entries
    12

    Default

    I'm sorry but even after copying the HTML and putting it up as a page inthe browser, I still cannot understand what you mean by:

    my problem now is how can i get tha value of selected row with only checkBox is checked ones is button "Release" is click
    Do you mean that only if a checkbox is checked can the release button be clicked? If so, try out this demo:

    http://home.comcast.net/~jscheuer1/s...x-button-h.htm

    If that's what you want, use your browser's "View Source" to get the code.

    If not, please explain just what you do want.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. show table based on for loop in javascript
    By udaybabu in forum JavaScript
    Replies: 2
    Last Post: 10-02-2012, 03:11 PM
  2. Select/unselect all checkbox fields using pure Javascript and HTML
    By m3andros in forum Submit a DHTML or CSS code
    Replies: 1
    Last Post: 02-20-2008, 02:16 AM
  3. Using a Checkbox to update table
    By Grant Holmes in forum PHP
    Replies: 1
    Last Post: 12-26-2007, 06:06 PM
  4. Reveal input fields when checking a checkbox
    By pama in forum JavaScript
    Replies: 1
    Last Post: 10-23-2007, 07:24 AM

Bookmarks

Posting Permissions

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