title: Uncaught TypeError: object is not a function (calling onchange function)
body: <p>My code is big so I will keep it short. I am tring to fire onchange event of Select atribute. Problem is that when I fire it I got this error:</p>
  
  <pre><code>Uncaught TypeError: object is not a function
  </code></pre>
  
  <p>Since my code is big I will show to you codes where I decalare onchange event and when I fire it. </p>
  
  <p>Here is when onchange function is declared:</p>
  
  <pre><code> function e(b, c) {
          function a() {
              if (b.current_modal) {
                  b.current_modal.className = "hide"
              }
              f("overlay").className = "hide"
          }
          jigsaw.UI.close_lightbox = a;
          Util.$("overlay").click(a);
          Util.$("set-parts").change(function () {
              if (this.parts != 9) {
                  jsaw.set_image("images/puzzle.jpeg")
              } else {
                  jsaw.set_image("images/puzzle1.jpeg")
              }
              c.emit(jigsaw.Events.PARTS_NUMBER_CHANGED, +this.value);
              c.emit(jigsaw.Events.RENDER_REQUEST)
          });
          Util.$("game-options").click("a", function (h) {
              if (jigsaw.Events[this.id]) {
                  h.preventDefault();
                  c.emit(jigsaw.Events[this.id])
              }
          })
      }
  </code></pre>
  
  <p>and here is when I fire onchange event:</p>
  
  <pre><code>show_time: function () {
             /*.....*/
  
          javascript: document.getElementById("date").innerHTML = ScoreResult;
          document.getElementById("set-parts").selectedIndex = 1;
          document.getElementById('set-parts').onchange();
  
  
      }
  </code></pre>