mychiefs58
asked on
Javascript Dropdown Menu Reset Issue
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 (www.midweststereo.com) 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.
HEAD SECTION
<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,re store){ //v3.0
eval(targ+".location='"+se lObj.optio ns[selObj. selectedIn dex].value +"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
BODY SECTION
<td align="center" valign="top"><form name="form1" id="form1">
<label>
<select name="select" onchange="MM_jumpMenu('par ent',this, 0);MM_jump Menu('pare nt',this,0 )">
<option>::Shop By Brand::</option>
<option value="ableton_store.html" >Ableton</ option>
<option value="akai_store.html">Ak ai</option >
<option value="akg_store.html">AKG </option>
<option value="alesis_store.html"> Alesis</op tion>
<option value="allen_heath_store.h tml">Allen & Heath</option>
<option value="alto_store.html">Al to</option >
<option value="ameraudio_store.htm l">America n Audio</option>
<option value="amerdj_store.html"> American DJ</option>
<option value="antari_store.html"> Antari</op tion>
<option value="art_store.html">ART </option>
<option value="audio_technica_stor e.html">Au dio Technica</option>
<option value="auralex_store.html" >Auralex</ option>
<option value="bbe_store.html">BBE </option>
<option value="behringer_store.htm l">Behring er</option >
<option value="boss_store.html">Bo ss</option >
<option value="cad_store.html">CAD </option>
<option value="cakewalk_store.html ">Cakewalk </option>
<option value="cerwin_vega_store.h tml">Cerwi n Vega</option>
<option value="chauvet_store.html" >Chauvet</ option>
<option value="cortex_store.html"> Cortex</op tion>
<option value="crest_audio_store.h tml">Crest Audio</option>
<option value="crown_store.html">C rown</opti on>
<option value="dbx_store.html">DBX </option>
<option value="denon_store.html">D enon</opti on>
<option value="digidesign_store.ht ml">Digide sign</opti on>
<option value="dynacord_store.html ">Dynacord </option>
<option value="eaw_store.html">EAW </option>
<option value="echo_audio_store.ht ml">Echo Audio</option>
<option value="ecler_store.html">E cler</opti on>
<option value="edirol_store.html"> Edirol</op tion>
<option value="elation_store.html" >Elation</ option>
<option value="electrovoice_store. html">Elec tro Voice</option>
<option value="gator_store.html">G ator</opti on>
<option value="gemini_store.html"> Gemini</op tion>
<option value="global_truss_store. html">Glob al Truss</option>
<option value="grado_store.html">G rado</opti on>
<option value="grundorf_store.html ">Grundorf </option>
<option value="hosa_store.html">Ho sa</option >
<option value="jbl_store.html">JBL </option>
<option value="klarkteknik_store.h tml">Klark Teknik</option>
<option value="korg_store.html">Ko rg</option >
<option value="lexicon_store.html" >Lexicon</ option>
<option value="lillite_store.html" >LittleLit e</option>
<option value="mach_store.html">Ma ch</option >
<option value="mackie_store.html"> Mackie</op tion>
<option value="ma_lighting_store.h tml">MA Lighting</option>
<option value="martin_store.html"> Martin</op tion>
<option value="maudio_store.html"> M-Audio</o ption>
<option value="max_optical_store.h tml">Max Optical</option>
<option value="novation_store.html ">Novation </option>
<option value="numark_store.html"> Numark</op tion>
<option value="odyssey_store.html" >Odyssey</ option>
<option value="omnisistems_store.h tml">Omnis istems</op tion>
<option value="ortofon_store.html" >Ortofon</ option>
<option value="pcdj_store.html">PC DJ</option >
<option value="peavey_store.html"> Peavey</op tion>
<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">Ra ne</option >
<option value="raxxess_store.html" >Raxxess</ option>
<option value="roadready_store.htm l">Road Ready</option>
<option value="rode_store.html">Ro de</option >
<option value="roland_store.html"> Roland</op tion>
<option value="samson_store.html"> Samson</op tion>
<option value="sefour_store.html"> Sefour</op tion>
<option value="sennheiser_store.ht ml">Sennhe iser</opti on>
<option value="shure_store.html">S hure</opti on>
<option value="sicmats_store.html" >SicMats</ option>
<option value="sony_store.html">So ny</option >
<option value="soundcraft_store.ht ml">Soundc raft</opti on>
<option value="spacetek_store.html ">Spacetec k</option>
<option value="stanton_store.html" >Stanton</ option>
<option value="tannoy_store.html"> Tannoy</op tion>
<option value="tapco_store.html">T apco</opti on>
<option value="tascam_store.html"> Tascam</op tion>
<option value="tc_elec_store.html" >TC Electronics</option>
<option value="tchelicon_store.htm l">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">Ur ei</option >
<option value="vestax_store.html"> Vestax</op tion>
<option value="yorkville_store.htm l">Yorkvil le</option >
<option value="zoom_store.html">Zo om</option >
</select>
</label>
<br />
<br />
</form> </td>
When one goes to our site (www.midweststereo.com) 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.
HEAD SECTION
<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,re
eval(targ+".location='"+se
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
BODY SECTION
<td align="center" valign="top"><form name="form1" id="form1">
<label>
<select name="select" onchange="MM_jumpMenu('par
<option>::Shop By Brand::</option>
<option value="ableton_store.html"
<option value="akai_store.html">Ak
<option value="akg_store.html">AKG
<option value="alesis_store.html">
<option value="allen_heath_store.h
<option value="alto_store.html">Al
<option value="ameraudio_store.htm
<option value="amerdj_store.html">
<option value="antari_store.html">
<option value="art_store.html">ART
<option value="audio_technica_stor
<option value="auralex_store.html"
<option value="bbe_store.html">BBE
<option value="behringer_store.htm
<option value="boss_store.html">Bo
<option value="cad_store.html">CAD
<option value="cakewalk_store.html
<option value="cerwin_vega_store.h
<option value="chauvet_store.html"
<option value="cortex_store.html">
<option value="crest_audio_store.h
<option value="crown_store.html">C
<option value="dbx_store.html">DBX
<option value="denon_store.html">D
<option value="digidesign_store.ht
<option value="dynacord_store.html
<option value="eaw_store.html">EAW
<option value="echo_audio_store.ht
<option value="ecler_store.html">E
<option value="edirol_store.html">
<option value="elation_store.html"
<option value="electrovoice_store.
<option value="gator_store.html">G
<option value="gemini_store.html">
<option value="global_truss_store.
<option value="grado_store.html">G
<option value="grundorf_store.html
<option value="hosa_store.html">Ho
<option value="jbl_store.html">JBL
<option value="klarkteknik_store.h
<option value="korg_store.html">Ko
<option value="lexicon_store.html"
<option value="lillite_store.html"
<option value="mach_store.html">Ma
<option value="mackie_store.html">
<option value="ma_lighting_store.h
<option value="martin_store.html">
<option value="maudio_store.html">
<option value="max_optical_store.h
<option value="novation_store.html
<option value="numark_store.html">
<option value="odyssey_store.html"
<option value="omnisistems_store.h
<option value="ortofon_store.html"
<option value="pcdj_store.html">PC
<option value="peavey_store.html">
<option value="pioneer_store.html"
<option value="presonus_store.html
<option value="qsc_store.html">QSC
<option value="quiklok_store.html"
<option value="rane_store.html">Ra
<option value="raxxess_store.html"
<option value="roadready_store.htm
<option value="rode_store.html">Ro
<option value="roland_store.html">
<option value="samson_store.html">
<option value="sefour_store.html">
<option value="sennheiser_store.ht
<option value="shure_store.html">S
<option value="sicmats_store.html"
<option value="sony_store.html">So
<option value="soundcraft_store.ht
<option value="spacetek_store.html
<option value="stanton_store.html"
<option value="tannoy_store.html">
<option value="tapco_store.html">T
<option value="tascam_store.html">
<option value="tc_elec_store.html"
<option value="tchelicon_store.htm
<option value="technics_store.html
<option value="udg_store.html">UDG
<option value="ultimate_store.html
<option value="urei_store.html">Ur
<option value="vestax_store.html">
<option value="yorkville_store.htm
<option value="zoom_store.html">Zo
</select>
</label>
<br />
<br />
</form> </td>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Computer101
Community Support Moderator