Title: 'this.initialize' is null or not an object

Hi, working on the accordion widget and its actually working nice (doesnt seem to be jumpy) now but I am receiving a _javascript_ error in IE 6.  Does anybody have any ideas why it is happening?  Thanks

<script language=_javascript_>

      sbr_stretch(el) {

              thisBodyId = el.parentNode.id + "_body";

              thisBody = $(thisBodyId);

              if (!Element.visible(thisBody)) {

                      panels = el.parentNode.parentNode.getElementsByTagName('div');

                      var elup;

                  for (i = 0; i < panels.length; i++) {

                      if (panels[i].className == 'panel_body') {

                          if (panels[i] != thisBody) {

                              if (Element.visible(panels[i])) {

                                      elup = panels[i];

                                  }

                          }

                      }

                  }

                  if (elup) {

                              // the next command is where the _javascript_ errors (but it still works)

                          Effect.Parallel (

                                      [

                              new Effect.SlideUp(elup, {duration: .2}),

                              new Effect.SlideDown(thisBody, {duration: .2})

                              ]

                          );

                  }

                  else {

                      Effect.SlideDown(thisBody, {duration: .2});

                  }

              }

      }

</script>

<div class="stretchBar" id="myStretchBar">

    <div id="panel1">

        <div class="title" 1</div>

            <div id="panel1_body" class="panel_body" style="display: none">

                <div>

                    <div>stuff in panel 1</div>

                </div>

            </div>

        </div>

        <div id="panel2">

            <div class="title" 2</div>

                <div id="panel2_body" class="panel_body" style="display: none">

                   <div>       

                       <div>stuff in panel 2</div>

                   </div>

             </div>

      </div>

</div>

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to