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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:48:33+00:00 2026-06-17T12:48:33+00:00

below is my code. I can get the pieces to work right individually, but

  • 0

below is my code. I can get the pieces to work right individually, but can’t pick out why its not working as a whole. You can see a live example of it at http://www.center-center.com/frames-stretcher%20app.php. I would like the form to update the table at the bottom of the page every time a form element is changed. The page functions properly when changing the radio button selected and the text inputs, but doesn’t update on the fly when using the drop down menus for a reason I’m unaware of. The values with the select elements are communicated, but are not updated on the fly like the other inputs for some reason. I’ve tested them individually and it works fine, but when all of it’s together it’s a no go. Any help would be greatly appreciated as I’ve been trying to get this to work properly for the past couple days.

    $(document).ready(function(){
        var type = null;

        $("#stretcher-op").change(function() {
            $("#stock-select div").hide();

            if (type != $('input[name=type]:checked').val()) {
                if (type == 'frame') {
                    $("select#stock-op").remove();
                    $("select#corner-op").remove();
                    $("select#finish-op").remove();

                    $("label[for=finish-op]").hide();
                }

                $("label[for=stock-op]").after('<select id="stock-op" name="stock"><option selected="selected"></option><?php $i = 0; foreach($stretcher_stock_options as $option) { if ($option['show'] == 1) { echo('<option value="' . $i . '">' . $option['name'] . '</option>'); } $i++; } ?></select>');
                $("label[for=corner-op]").after('<select id="corner-op" name="corner"><option selected="selected"></option><?php $i = 0; foreach($stretcher_corner_options as $option) { if ($option['show'] == 1) { echo('<option value="' . $i . '">' . $option['name'] . '</option>'); } $i++; } ?></select>');
            }

            type = $('input[name=type]:checked').val(); //stretcher
        });

        $("#frame-op").change(function() {
            $("#stock-select div").hide();

            if (type != $('input[name=type]:checked').val()) {
                if (type == 'stretcher') {
                    $("select#stock-op").remove();
                    $("select#corner-op").remove();
                }

                $("label[for=finish-op]").show();               

                $("label[for=stock-op]").after('<select id="stock-op" name="stock"><option selected="selected"></option><?php $i = 0; foreach($framing_stock_options as $option) { if ($option['show'] == 1) { echo('<option value="' . $i . '">' . $option['name'] . '</option>'); } $i++; } ?></select>');
                $("label[for=corner-op]").after('<select id="corner-op" name="corner"><option selected="selected"></option><?php $i = 0; foreach($framing_corner_options as $option) { if ($option['show'] == 1) { echo('<option value="' . $i . '">' . $option['name'] . '</option>'); } $i++; } ?></select>');
                $("label[for=finish-op]").after('<select id="finish-op" name="finish"><option selected="selected"></option><?php $i = 0; foreach($framing_finish_options as $option) { if ($option['show'] == 1) { echo('<option value="' . $i . '">' . $option['name'] . '</option>'); } $i++; } ?></select>');
            }

            type = $('input[name=type]:checked').val(); //frame
        });

        $("input,select").change(function() {
            width = $('#width').val();
            height = $('#height').val();
            quantity = $('#quantity-op').val();
            stock = $('#stock-op option:selected').val();
            corner = $('#corner-op option:selected').val();
            finish = $('#finish-op option:selected').val();

            $("#quote").load('art-product-calculator.php?type=' + type + '&width=' + width +'&height=' + height + '&quantity=' + quantity + '&stock=' + stock + '&corner=' + corner + '&finish=' + finish);
        });
    });
</script>
</head>

<body>
<div id="container">
    <header id="banner">
        <img src="" />
    </header>

    <section id="selection">
        <div class="option" id="stretcher">
            <label for="stretcher-op">Stretcher</label><br />
            <input id="stretcher-op" name="type" type="radio" value="stretcher" />
        </div>
        <div class="option" id="frame">
            <label for="frame-op">Frame</label><br />
            <input id="frame-op" name="type" type="radio" value="frame" />
        </div>

        <div class="option" id="quantity">
            <label for="quantity-op">Quantity </label><input id="quantity-op" name="width" type="" value="" size="6" />
        </div>

        <div class="option" id="dimensions">
            <input id="width" name="width" type="" value="width" size="6" /> <label for="width">inches</label> by 
            <input id="height" name="height" type="" value="height" size="6"  /> <label for="height">inches</label>
        </div>

        <div class="option" id="stock-select">
            <label for="stock-op">Stock Selection </label><div class="space-holder">&nbsp;</div>
        </div>

        <div class="option" id="corner-joint">
            <label for="corner-op">Corner Joint </label>
        </div>

        <div class="option" id="finish">
            <label for="finish-op">Finishing </label>
        </div>
    </section>

    <section id="quote">
    </section>
</div>
</body>
</html>
  • 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-17T12:48:34+00:00Added an answer on June 17, 2026 at 12:48 pm

    Your dropdown menus are added dynamically, you have to delegate event on them like this:

    $(document).on("change", "#mydrop, #lastdrop, #newdrop", function() {
    
         // do something    
    
    });
    

    And You also need to use latest version of jQuery if not using.

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

Sidebar

Related Questions

I can't get this code to work. Declared playpauseButton just above the given below
I have a piece of code (below) that can get the text of an
any idea how i can get the code below to produce this output? 1
How can I get the code below to output node names that I define?
I can't get the code below to compile (see errors). Advice on correction would
Below is a cut down example of some c# code I can't get to
I can't get fancybox to open my links in iframe. My code below. Thanks!
I ended up with this horrible code below, I can't get a better result
Is there an ide/site that I can use to analyse code below and get
In past, I am using Listview and using below code can show a particular

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.