Jump List/Menu

windows

Guest
Is there a way to open a llink from a list/menu item in a new browser window. I placed this in the code and it didn't work.<br />
<br />
<option value="http://www.dhfs.state.wi.us/dph_emsip/index.htm">Wisconsin</option><br />
<option value="http://wdhfs.state.wy.us/ems" target="blank">Wyoming</option><!--content-->You left the underscore out.<br />
<br />
target="_blank"<!--content-->I put the underscore and it didn't work still, is this a valid tag within the form tag?<!--content--><form>, yes (with a tranitional or frameset DOCTYPE); <option>, no...<!--content-->just noticed those were option tags...<br />
Post more of your source, I can't do much with 2 lines. :)<!--content-->This is for the whole drop down jump menu:<br />
<br />
<form name="EMS Website Links"><br />
<div align="center"><br />
<select name="menu1" class="text" onChange="MM_jumpMenu('parent',this,0)"><br />
<option selected>select a state</option><br />
<option value="http://www.alapubhealth.org">Alabama</option><br />
<option value="http://www.chems.alaska.gov">Alaska</option><br />
<option value="http://www.hs.state.az.us.bems">Arizona</option><br />
<option value="http://www.emsa.ca.gov">California</option><br />
<option value="http://www.cdphe.state.co.us/em/emhom.html">Colorado</option><br />
<option value="http://www.state.ct.us/dph/">Connecticut</option><br />
<option value="http://www.dchealth.com">District of Columbia</option><br />
<option value="http://www.doh.state.fl.us/EMS">Florida</option><br />
<option value="http://www.ph.dhr.state.ga.us/ems/emshone.htm">Georgia</option><br />
<option value="http://hawaii.gov/doh/resource/ems/index.html">Hawaii</option><br />
<option value="http://www.idems.idhw.state.id.us">Idaho</option><br />
<option value="http://www.illemsdata.org">Illinois</option><br />
<option value="http://www.state.in.us/sema/ems.html">Indiana</option><br />
<option value="http://www.idph.state.ia.us/ems">Iowa</option><br />
<option value="http://www.ksbems.org">Kansas</option><br />
<option value="http://www.publichealth.state.ky.us/ems.htm">Kentucky</option><br />
<option value="http://www.dhh.state.la.us/oph/ems.htm">Louisiana</option><br />
<option value="http://www.state.me.us/dps/ems">Maine</option><br />
<option value="http://miemss.umaryland,edu/Home.htm">Maryland</option><br />
<option value="http://www.magenet.state.ma.us/dph.oems.htm">Massachusetts</option><br />
<option value="http://www.emsmichigan.net">Michigan</option><br />
<option value="http://www.emsrb.state.mn.us">Minnesota</option><br />
<option value="http://msdh.state.ms.us/ems/index.htm">Missippi</option><br />
<option value="http://www.health.state.mo.us">Missouri</option><br />
<option value="http://www.ophhs.state.mt.us">Montana</option><br />
<option value="http://www.hhs.state.ne.us/ems/emsindex.htm">Nebraska</option><br />
<option value="http://health2k.state.nv.us/ems/index.htm">Nevada</option><br />
<option value="http://www.state.nh.us">New Hampshire</option><br />
<option value="http://www.state.ny.us/health/ems/hlthems">New Jersey</option><br />
<option value="http://www.health.state.nm.us">New Mexico</option><br />
<option value="http://www.health.state.ny.us">New York</option><br />
<option value="http://www.ncems.org">North Carolina</option><br />
<option value="http://www.health.state.nd.us">North Dakota</option><br />
<option value="http://www.state.oh.us/cdps/division/ems/ems_local/default.htm">Ohio</option><br />
<option value="http://www.health.state.ok.us/programs/ems/index.html">Oklahoma</option><br />
<option value="http://www.ohd.hr.state.or.us/cehs/ems/">Oregon</option><br />
<option value="http://www.health.state.pa.us/hpa/ems/default.htm">Pennsylvania</option><br />
<option value="http://www.health.state.ri.us">Rhode Island</option><br />
<option value="http://www.scdhec.net/hr/ems">South Carolina</option><br />
<option value="http://www.state.sd.us">South Dakota</option><br />
<option value="http://www.state.tn.us/health/ems">Tennessee</option><br />
<option value="http://www.tdh.state.tx.us/">Texas</option><br />
<option value="http://www.health.state.ut.us/ems">Utah</option><br />
<option value="http://www.state.vt.us/health/ems">Vermont</option><br />
<option value="http://www.vdh.state.va.us/oems">Virginia</option><br />
<option value="http://www.doh.wa.gov/hsqa.emtp">Washington</option><br />
<option value="http://www.wvoems.org">West Virginia</option><br />
<option value="http://www.dhfs.state.wi.us/dph_emsip/index.htm">Wisconsin</option><br />
<option value="http://wdhfs.state.wy.us/ems" target="_blank">Wyoming</option><br />
</select><br />
</div><br />
</form><!--content-->I notice that 'onChange' you call a function, what is that functions code?<!--content-->this is the script dreamweaver produced: I am more of a visual designer - wingin' it with the programming. <br />
<br />
<script language="JavaScript" type="text/JavaScript"><br />
<!--<br />
function MM_jumpMenu(targ,selObj,restore){ //v3.0<br />
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");<br />
if (restore) selObj.selectedIndex=0;<br />
}<br />
//--><br />
</script><!--content-->K, I'll get on it and find a solution for you. :D<!--content-->thank You...<br />
<br />
I bug my programmer all the time, i figured i would seek help elsewhere.<!--content--><script type="text/javascript"><br />
//<![CDATA[<br />
function MM_jumpMenu(targ,selObj,restore)<br />
{<br />
var op = selObj.options[selObj.selectedIndex];<br />
<br />
if(op.text.toLowerCase() != 'wisconsin')<br />
{<br />
location = op.value;<br />
}<br />
<br />
else window.open(op.value, '', '');<br />
<br />
if (restore) selObj.selectedIndex = 0;<br />
}<br />
//]]><br />
</script><!--content-->oh my gosh you rock!<br />
<br />
The only problem is i have to have every state(link) open in a new window. how do i do that. sorry i didn't mention that before.<!--content-->Borrowing from Fredmv, it should be:<br />
<br />
<script type="text/javascript"><br />
//<![CDATA[<br />
function MM_jumpMenu(targ,selObj,restore)<br />
{<br />
var op = selObj.options[selObj.selectedIndex];<br />
<br />
window.open(op.value, '', '');<br />
<br />
if (restore) selObj.selectedIndex = 0;<br />
}<br />
//]]><br />
</script><!--content-->DANG IT FRED! You beat me! Well, this is what I got.<br />
<br />
<script language="JavaScript" type="text/JavaScript"> <br />
<!-- <br />
function MM_jumpMenu(targ,selObj,restore){ //v3.0 <br />
window.open(selObj.options[selObj.selectedIndex].value)<br />
<br />
if (restore) selObj.selectedIndex=0; <br />
} <br />
//--> <br />
</script><br />
<br />
<br />
<br />
I'll remember that fred!lol<br />
<br />
This will always open in new window<!--content-->Yes — the two above pieces of code are what you want — from your sample piece of code it seemed like all you wanted was so the "Wisconsin" option opened in a new window.<!--content-->thank you soooo much.<!--content-->No Problem, Glad we could help :D<!--content-->
 
Back
Top