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

  • SEARCH
  • Home
  • 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 9269883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:14:01+00:00 2026-06-18T15:14:01+00:00

I know this is probably an easy one but I can’t figure it out.

  • 0

I know this is probably an easy one but I can’t figure it out. I need to create cascading select boxes but I don’t know how to reference the target select box that is 3 over from the calling select. I’ve tried:

$(this).next().next().next().html(data)

But that doesn’t work. I suspect it has something to do the children of the parent.

EDIT: Here is the HMTL

<table id="invoiceTable">
<tr>
    <th></th>
    <th class="productColumn">Product</th>
    <th class="lotColumn">Lot #</th>
    <th class="wheelColumn">Wheel #</th>
    <th class="packageType">Pkg Type</th>
    <th class="quantityField">Weight</th>
    <th class="priceColumn">Price</th>
    <th class="subTotalColumn">Subtotal</th>
    <th class="soldOut">Sold Out</th>
</tr>
<?php
if(!$newInvoice){ $rowNum = 0;
    foreach($details as $detail){ /* @var $detail Creamery_Invoice_details */?>


<tr>
    <td><button type="button" class="delete">D</button></td>
    <td class="productColumn">

        <select name="productInputName[]" class="productSelect" id="cheeseName">
            <option></option>

        </select>

    </td>

    <td>
        <select name="lotNumber[]" class="lotNumber" >
            <option value=0>Lot #</option>

        </select>
    </td>
    <td>
        <select name="wheelNumber[]" class="wheelNumber">
            <option value=0>Wheel</option>

                </select>

            </td>


            <td>
            <select name="packageType[]" class="packageType">
            <option value=0>Pkg Type</option>

        </select>
    </td>

    <td class="quantityField"><input name="quantity[]" type="number"> <?php echo ' value="',$detail->getQuantity(),'"';   ?>></td>
    <td class=priceField><input name="price[]" type="number" step="any">

    </td>
    <td class="subtotalField"><input type="number" step="any" readonly="readonly"></td>
    <td class="soldOut"><input type="checkbox" name="soldOut[]" <?php if($detail->getSoldOut()){echo 'checked="checked"';} ?> ></td>

</tr>

EDIT 2: I just wanted to add, in case someone else comes across this, that $(this).whatever doesn’t work because it is in the ajax call I need to do it like this:

$(".productSelect").change(function(){
    var product = this;
    $.get("/path to php file", 'type='+$(this).val(),function(data){
        $(product).closest('tr').find('.lotNumber').html(data);
    })
});
  • 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-06-18T15:14:03+00:00Added an answer on June 18, 2026 at 3:14 pm

    You can use the class of the 3rd select from productSelect which is packageType.

    See below,

    $(this).closest('tr').find('.packageType').html(data)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this is probably a really amateur question, but I can't figure this
Okay, I know. I know... this one is probably an easy one. But, I'm
I know this is probably super easy, but I'm having a hard time wading
I know this is probably something simple but I can't seem to find anything
So, I know this is probably a FAQ, but I can't seem to unravel
This is my first question here, probably a very simple one but I can't
I am new to vimscript so this is probably and easy one. I know
I know this is probably an easy question for most of you guys. But
This is probably a really easy one... but after 4 days off from work
G'day folks This is probably an easy one for you lot, but i'm curious...

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.