0 Replies Latest reply: Jul 13, 2011 9:08 PM by jl2000 RSS

    Why doesn't a "jump menu" work inside a dialog box?

    jl2000 Community Member

      Hi -

      I have a Jump Menu inside a dialog box that will not go to the specified URL when I hit the GO button.  I hope the code explains what I'm doing better.  The script is generated by Dreamweaver as is the Go button and the onClick function.

       

      However - the button doesn't work.  If I select from the list and click it - nothing happens.


      TIA your insight.

      JL

       

      <script type="text/javascript">
      function MM_jumpMenuGo(objId,targ,restore){ //v9.0
        var selObj = null;  with (document) { 
        if (getElementById) selObj = getElementById(objId);
        if (selObj) eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
        if (restore) selObj.selectedIndex=0; }
      }
      </script>
      
      </head>
      <body>
      
      <div id="collection-sched-search">
           
           <a href="#" id="collection-day-button">
          <img src="_images/collection-day-button-300.png" width="300" height="98"  />
          </a>
           
      </div>
            
      <div id="collection-day-dialog" title="When is my Collection Day?"> 
      
      
      <h3>Collection Schedules</h3>
      <p>Choose a municipality and click "Go" to view collection calendar.</p>
            
              <form name="form2" id="form2">
           <select name="jumpMenu-Muni" size="3" id="jumpMenu-Muni">
                      <option value="Invalid">---Select a Municipality - </option>
                      <option value="http://www.cnn.com">Absecon</option>
                      <option value=""http://www.apple.com">Atlantic City</option>
                      <option value="http://www.newpixelcity.com">Brigantine</option>
                      <option value="#">Buena Borough</option>
      
                      </select>
      <input type="button" name="go_button2" id= "go_button2" value="Go" onclick="MM_jumpMenuGo('jumpMenu-Muni','parent',0)" />
              </form>
              
      </div>  <!--/ collection-day-dialog-->