Improve company productivity with a Business Account.Sign Up


Javascript Dropdown Menu Reset Issue

Posted on 2007-11-30
Medium Priority
Last Modified: 2008-02-21
I inherited this site development from a couple of yokels.  It mostly runs on Shopsite, with which I have enormous issue, but this is a (probably) simple javascript issue.  I come from an ASP/VB background and haven't really ever used Javascript.  I know I'll need to learn it, and I have gone over this code to try to understand it.  So far, I cannot solve this problem.

When one goes to our site ( they will find a dropdown menu in the upper right hand corner.  It takes customers to specific manufacturer's pages.  It works as long as another link is clicked between uses of the dropdown menu.  However, if someone selects, for example, JBL, goes to that page, and then goes back into the menu because they meant to click Hosa, it will not execute.  I have included the script function code that's in the head section of the page, and the code for the dropdown menu.

<script type="text/JavaScript">
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  if (restore) selObj.selectedIndex=0;


   <td align="center" valign="top"><form name="form1" id="form1">
          <select name="select" onchange="MM_jumpMenu('parent',this,0);MM_jumpMenu('parent',this,0)">
            <option>::Shop By Brand::</option>
            <option value="ableton_store.html">Ableton</option>
            <option value="akai_store.html">Akai</option>
            <option value="akg_store.html">AKG</option>
            <option value="alesis_store.html">Alesis</option>
            <option value="allen_heath_store.html">Allen &amp; Heath</option>
            <option value="alto_store.html">Alto</option>
            <option value="ameraudio_store.html">American Audio</option>
            <option value="amerdj_store.html">American DJ</option>
            <option value="antari_store.html">Antari</option>
            <option value="art_store.html">ART</option>
            <option value="audio_technica_store.html">Audio Technica</option>
            <option value="auralex_store.html">Auralex</option>
            <option value="bbe_store.html">BBE</option>
            <option value="behringer_store.html">Behringer</option>
            <option value="boss_store.html">Boss</option>
            <option value="cad_store.html">CAD</option>
            <option value="cakewalk_store.html">Cakewalk</option>
            <option value="cerwin_vega_store.html">Cerwin Vega</option>
            <option value="chauvet_store.html">Chauvet</option>
            <option value="cortex_store.html">Cortex</option>
            <option value="crest_audio_store.html">Crest Audio</option>
            <option value="crown_store.html">Crown</option>
            <option value="dbx_store.html">DBX</option>
            <option value="denon_store.html">Denon</option>
            <option value="digidesign_store.html">Digidesign</option>
            <option value="dynacord_store.html">Dynacord</option>
            <option value="eaw_store.html">EAW</option>
            <option value="echo_audio_store.html">Echo Audio</option>
            <option value="ecler_store.html">Ecler</option>
            <option value="edirol_store.html">Edirol</option>
            <option value="elation_store.html">Elation</option>
            <option value="electrovoice_store.html">Electro Voice</option>
            <option value="gator_store.html">Gator</option>
            <option value="gemini_store.html">Gemini</option>
            <option value="global_truss_store.html">Global Truss</option>
            <option value="grado_store.html">Grado</option>
            <option value="grundorf_store.html">Grundorf</option>
            <option value="hosa_store.html">Hosa</option>
            <option value="jbl_store.html">JBL</option>
            <option value="klarkteknik_store.html">Klark Teknik</option>
            <option value="korg_store.html">Korg</option>
            <option value="lexicon_store.html">Lexicon</option>
            <option value="lillite_store.html">LittleLite</option>
            <option value="mach_store.html">Mach</option>
            <option value="mackie_store.html">Mackie</option>
            <option value="ma_lighting_store.html">MA Lighting</option>
            <option value="martin_store.html">Martin</option>
            <option value="maudio_store.html">M-Audio</option>
            <option value="max_optical_store.html">Max Optical</option>
            <option value="novation_store.html">Novation</option>
            <option value="numark_store.html">Numark</option>
            <option value="odyssey_store.html">Odyssey</option>
            <option value="omnisistems_store.html">Omnisistems</option>
            <option value="ortofon_store.html">Ortofon</option>
            <option value="pcdj_store.html">PCDJ</option>
            <option value="peavey_store.html">Peavey</option>
            <option value="pioneer_store.html">Pioneer</option>
            <option value="presonus_store.html">Presonus</option>
            <option value="qsc_store.html">QSC</option>
            <option value="quiklok_store.html">Quicklok</option>
            <option value="rane_store.html">Rane</option>
            <option value="raxxess_store.html">Raxxess</option>
            <option value="roadready_store.html">Road Ready</option>
            <option value="rode_store.html">Rode</option>
            <option value="roland_store.html">Roland</option>
            <option value="samson_store.html">Samson</option>
            <option value="sefour_store.html">Sefour</option>
            <option value="sennheiser_store.html">Sennheiser</option>
            <option value="shure_store.html">Shure</option>
            <option value="sicmats_store.html">SicMats</option>
            <option value="sony_store.html">Sony</option>
            <option value="soundcraft_store.html">Soundcraft</option>
            <option value="spacetek_store.html">Spaceteck</option>
            <option value="stanton_store.html">Stanton</option>
            <option value="tannoy_store.html">Tannoy</option>
            <option value="tapco_store.html">Tapco</option>
            <option value="tascam_store.html">Tascam</option>
            <option value="tc_elec_store.html">TC Electronics</option>
            <option value="tchelicon_store.html">TC Helicon</option>
            <option value="technics_store.html">Technics</option>
            <option value="udg_store.html">UDG</option>
            <option value="ultimate_store.html">Ultimate</option>
            <option value="urei_store.html">Urei</option>
            <option value="vestax_store.html">Vestax</option>
            <option value="yorkville_store.html">Yorkville</option>
            <option value="zoom_store.html">Zoom</option>
          <br />
              <br />
            </form>            </td>
Question by:mychiefs58
LVL 12

Accepted Solution

Sinoj Sebastian earned 200 total points
ID: 20384996
following code is missing in all other pages (manufacturer's pages) please add it and test it.

also you do not need to call the same function twice
<script type="text/JavaScript">
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  if (restore) selObj.selectedIndex=0;

Open in new window


Expert Comment

ID: 20953171
Forced accept.

Community Support Moderator

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

608 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question