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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:10:55+00:00 2026-05-27T06:10:55+00:00

I have a dynamic form where rows are added and removed using JavaScript. From

  • 0

I have a dynamic form where rows are added and removed using JavaScript. From Safari, Chrome and Firefox, the form works beautifully. In IE, well, let’s just say it doesn’t…

<div id="container">
  <div class="row">
    <input name="name[]">
    <select name="color[]">
      <option>Red</option>
      <option>Green</option>
      <option>Blue</option>
    </select>
  </div>
  <div class="row">
    <input name="name[]">
    <select name="color[]">
      <option>Red</option>
      <option>Green</option>
      <option>Blue</option>
    </select>
  </div>

  <a id="add-another" href="#">Add a row</a>
</div>

<script src="prototype.js"></script>
<script>
  $("container").observe("change", function(ev) {
    alert("changed " + ev.element() + " to " + $F(ev.element()));
  });

  $$("#container input, #container select").each(function(el) {
    el.observe("change", function(ev) {
      alert("changed[2] " + ev.element() + " to " + $F(ev.element()));
    });
  });

  $("add-another").observe("click", function(ev) {
    var cloned = $("container").down(".rule").clone(true);
    $("container").insert({top:cloned});
    ev.stop();
  });
</script>

The only onchange messages I see are the changed[2]. I would much rather see change, since that would mean I have only one listener, not hundreds.

Are there any known workarounds such that I can install a single observer on a parent node, and receive onchange events?

I have read an MSDN article on onchange and I did find a comment to the effect that onchange couldn’t be attached, but maybe there exists a solution?

  • 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-27T06:10:56+00:00Added an answer on May 27, 2026 at 6:10 am

    I’m somewhat surprised that works in Safari, FF, and Chrome. That’s something I would never even think about trying with a wrapper class because it’s not a form element. Clever.

    Unless it interferes with something else and until IE is rid from the world for the betterment of humanity, I think a viable alternative may be to leverage either PeriodicalExecutor or an extension of Abstract.TimedObserver to check on the wrapper class every once in a while, potentially in combination for a check for whether the browser is IE or not.

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

Sidebar

Related Questions

I have a web form which has dynamic table using repeating rows. New rows
How can I create a dynamic form using jQuery. For example if I have
I'm having a problem using nested partials with dynamic form builder code (from the
I have a form which is built dynamically using this jQuery plugin http://code.google.com/p/jquery-dynamic-form/ When
Using asp.net mvc 2 c#. I have a dynamic form. I want to get
I have a Dynamic Form in forms. How can I pass an argument from
I have a dynamic form that is generated based on javascript. Here's the relevant
I have a form with dynamic number of rows. $(#tbl).append(<tr><td name=Date+i+ id=Date_+i+>+com_date+</td><td id=day_+ i+>+theday
I have a dynamic form that can be cloned, using the SheepIt! plugin to
I have a form with a stage that has a dynamic number of groups

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.