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 6734377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:52:53+00:00 2026-05-26T10:52:53+00:00

I have list of elements and when I choose element from list, "value" from

  • 0

I have list of elements and when I choose element from list, "value" from code below are changing.

    <div class="drop-down-cont zi-5 fleft">
          <input class="dd-input" id="packaging_item_packaging_name" name="packaging_item[packaging_name]" title="Packaging Type" type="hidden" value="PX">
          <a class="drop-down-link item-qnt" href="#" id="packaging_item_packaging_name_link">Pallet</a>
          <div class="drop-down pic" style="visibility: visible; ">
            <div class="blue-tarr"></div>
            <div class="drop-down-list-cont w400">
              <div class="drop-down-list first pt-cases w100p" id="cases_results_"><ul class="w100p">
  
<li id="PX" class="selected">
  <a href="javascript:void(0)">Pallet</a>
</li>
<li id="PB">
  <a href="javascript:void(0)">Pallet Box</a>
</li>
<li id="PLP">
  <a href="javascript:void(0)">Peel pack</a>
</li>
    
</ul>



</div>
              <div class="pic-cont h100p"><img alt="Package Image" src="/images/pi_new/32.jpg?1312107854"> </div>
            </div>
            <div class="remark">
A platform used to hold or transport unit loads. 

</div>
            <a class="submit-btn2 pt-choose-btn-" href="javascript:void(0)" id="pack_apply">Apply</a>
          </div>
        </div>

<table id="pallet_table" style="display:none;">
    <tbody>
      <tr>
        <td>
          stacking factor:
        </td>
        <td>
          <input class="w44" id="packaging_item_stacking_factor" name="packaging_item[stacking_factor]" size="30" type="text" value="1">
        </td>
      </tr>
    </tbody>
  </table>

I want to show table when I choose ‘value’ to ‘PX’ and execute this script,

if ($('.dd-input').attr('value') == 'PX') {
    $('#pallet_table').show();}

but this doesn’t work dynamically. How I can handle this event then I change value from ‘smth’ to ‘PX’

  • 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-26T10:52:54+00:00Added an answer on May 26, 2026 at 10:52 am

    This should solve your problem (see this jsfiddle):

    jQuery('.dd-input').bind('change', function(){
        if (jQuery(this).val() == 'PX'){
            // do here whatever you need
            $('#pallet_table').show();
        }
    });
    

    I do not see however, how you would like the user to change the value of this field (in your code the field is hidden). If this is done through a different script, maybe the current approach is not the best one and you should call some function explicitly instead of doing it when the value is changed?

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

Sidebar

Related Questions

I have a few list elements, like this: <li class=item> <a class=toggle><h4>ämne<small>2010-04-17 kl 12:54
I have an internal application that I needs to have a drop down list
I have a navigator on my site, made of <ul> elements: <div class=navigator> <ul>
let's say i have a list with some elements and i want to choose
I have a drop-down list box and two text fields of id values namely
I have a list of elements (the X in the following examples) displayed either
I have a list of elements which I would like to make sortable and
I have a list of elements that I want to split into individual lists
I have a list of elements, and I've been using will_paginate up until now,
I have a list where elements are hidden for multiple reasons, each corresponding to

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.