jQWidgets Forums

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts

  • dave
    Member

    Sorry, I was just able to enter the formatted code. id and name of checkbox are not correct, however value is, hope this help my point:

       <!-- Lev 1 -->
    <ul style="padding-left:10px;">
    <li>
    <input type="checkbox" id="lev1" name="lev2" value="cat1"> Cat 1
    <!-- Lev 2 -->
    <ul style="padding-left:10px;">
    <li><input type="checkbox" id="lev1" name="lev2" value="cat1_sub1"> Sub-Cat 1</li>
    <li>
    <input type="checkbox" id="lev1" name="lev2" value="cat1_sub2"> Sub-Cat 2
    <!-- Lev 3 -->
    <ul style="padding-left:10px;">
    <li><input type="checkbox" id="lev1" name="lev2" value="cat1_sub2_it1"> Item 1</li>
    <li><input type="checkbox" id="lev1" name="lev2" value="cat1_sub2_it2"> Item 2</li>
    </ul><!-- /Lev3 -->
    </li>
    </ul><!-- /Lev2 -->
    </li>
    <li>
    <input type="checkbox" id="lev1" name="lev2" value="cat2"> Cat 2
    <!-- Lev 2 -->
    <ul style="padding-left:10px;">
    <li>
    <input type="checkbox" id="lev1" name="lev2" value="cat2_sub1"> Sub-Cat 1
    <!-- Lev 3 -->
    <ul style="padding-left:10px;">
    <li><input type="checkbox" id="lev1" name="lev2" value="cat2_sub1_it1"> Item 1</li>
    <li><input type="checkbox" id="lev1" name="lev2" value="cat2_sub1_it2"> Item 2</li>
    </ul><!-- /Lev3 -->
    </li>
    <li>
    <input type="checkbox" id="lev1" name="lev2" value="cat2_sub2"> Sub Cat 2
    <!-- Lev 3 -->
    <ul style="padding-left:10px;">
    <li><input type="checkbox" id="lev1" name="lev2" value="cat2_sub2_it1"> Item 1</li>
    <li><input type="checkbox" id="lev1" name="lev2" value="cat2_sub2_it2"> Item 2</li>
    </ul><!-- /Lev3 -->
    </li>
    </ul><!-- /Lev2 -->
    </li>
    </ul><!-- /Lev1 -->

    dave
    Member

    Peter, thanks for your quick reply.

    Please look at the sample code which illustrates what I am trying to achieve:


    Cat 1

    Sub-Cat 1

    Sub-Cat 2

    Item 1
    Item 2

    Cat 2

    Sub-Cat 1

    Item 1
    Item 2

    Sub Cat 2

    Item 1
    Item 2

    Basically, I have three levels: can select one Category, which auto select (check) the content below, or drill-down going from generic to specific (Item list, passing through Sub Category).
    jqxTree does it very nicely on the UI level, but I still don’t see where to specify the “value” of each item. You mentioned Ajax, and I used it a lot in my applications, however I am stuck on this, can you provide a more detailed example of the Ajax call and scripting file? PHP or any other language you like is fine.

    Thank you,
    Dave

Viewing 2 posts - 1 through 2 (of 2 total)