Results 1 to 1 of 1

Thread: Trouble Using Multiple Dropdown Menu Scripts On One Page

  1. #1
    Join Date
    Jul 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Trouble Using Multiple Dropdown Menu Scripts On One Page

    I am trying to utilize the same drop down menu javascript in 2 separate widgets on my blog. The first one works just fine, but on the second one the menu items link to the links that are designated on the first menu. It's probably a quick fix, but can anyone help resolve this issue? Here is the script for the first one. The second one is just the same except for the menu item names and where they link to:

    Code:
    <form name="form1">
      <select name="select1" size="1"
     style="background-color: rgb(227, 227, 227);"
     onchange="displaydesc(document.form1.select1, thetext1, 'textcontainer1')">
      <option selected="selected" value="http://www.aaflasvegas.org">American Advertising Federation Las Vegas</option>
      <option value="http://www.artinstitutes.edu/lasvegas">Art
    Institute of Las Vegas</option>
      <option value="http://sandiego.aiga.org">AIGA
    San Diego</option>
      <option value="http://www.cdf.org">Corporate Design Foundation</option>
      <option value="http://lvartsandculture.blogspot.com">Las Vegas Arts & Culture Blogspot</option>
      <option value="http://www.iabclasvegas.com">IABC Las Vegas</option>
      <option value="http://www.nvmbc.org">Nevada Minority Business Council</option>
      <option value="http://www.nlvchamber.com">North
    Las Vegas Chamber of Commerce</option>
      <option value="http://www.prsalasvegas.com">PRSA
    Las Vegas</option>
      <option value="http://www.unlv.edu">UNLV</option>
      <option value="http://www.fdff.org">Frederick Douglass Family Foundation</option>
      <option value="http://www.acf.hhs.gov/trafficking/">Rescue & Restore Victims of Human Trafficking</option>
      <option value="http://colorsoflupus.com">Colors of Lupus Nevada</option>
      </select>
      <input value="Go" onclick="jumptolink(document.form1.select1)"
     type="button"><br>
      <span id="textcontainer1" align="left"
     style="font-family: Arial; font-style: italic; font-variant: normal; font-weight: normal; font-size: 13px; line-height: normal; font-size-adjust: none; font-stretch: normal;">
      </span></form>
    <!--Added a javascript-->
    <script type="text/javascript">
    /***********************************************
    * I got this script from the below website
    * Visit http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    function displaydesc(container){
    }
    function jumptolink(what){
    var selectedopt=what.options[what.selectedIndex]
    window.open(selectedopt.value)
    }
    displaydesc(document.form1.select1, thetext1, 'textcontainer1')
    </script><!--End javascript-->
    Last edited by jscheuer1; 07-14-2010 at 06:28 AM. Reason: format code

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •