/    Sign up×
Community /Pin to ProfileBookmark

Jump List/Menu

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.

<option value=”http://www.dhfs.state.wi.us/dph_emsip/index.htm”>Wisconsin</option>
<option value=”http://wdhfs.state.wy.us/ems” target=”blank”>Wyoming</option>

to post a comment
HTML

16 Comments(s)

Copy linkTweet thisAlerts:
@PhillMcJan 23.2004 — You left the underscore out.

target="_blank"
Copy linkTweet thisAlerts:
@ckiskeauthorJan 23.2004 — I put the underscore and it didn't work still, is this a valid tag within the form tag?
Copy linkTweet thisAlerts:
@pyroJan 23.2004 — [font=monospace]<form>[/font], yes (with a tranitional or frameset DOCTYPE); [font=monospace]<option>[/font], no...
Copy linkTweet thisAlerts:
@PhillMcJan 23.2004 — just noticed those were option tags...

Post more of your source, I can't do much with 2 lines. ?
Copy linkTweet thisAlerts:
@ckiskeauthorJan 23.2004 — This is for the whole drop down jump menu:

<form name="EMS Website Links">

<div align="center">

<select name="menu1" class="text" onChange="MM_jumpMenu('parent',this,0)">

<option selected>select a state</option>

<option value="http://www.alapubhealth.org">Alabama</option>

<option value="http://www.chems.alaska.gov">Alaska</option>

<option value="http://www.hs.state.az.us.bems">Arizona</option>

<option value="http://www.emsa.ca.gov">California</option>

<option value="http://www.cdphe.state.co.us/em/emhom.html">Colorado</option>

<option value="http://www.state.ct.us/dph/">Connecticut</option>

<option value="http://www.dchealth.com">District of Columbia</option>

<option value="http://www.doh.state.fl.us/EMS">Florida</option>

<option value="http://www.ph.dhr.state.ga.us/ems/emshone.htm">Georgia</option>

<option value="http://hawaii.gov/doh/resource/ems/index.html">Hawaii</option>

<option value="http://www.idems.idhw.state.id.us">Idaho</option>

<option value="http://www.illemsdata.org">Illinois</option>

<option value="http://www.state.in.us/sema/ems.html">Indiana</option>

<option value="http://www.idph.state.ia.us/ems">Iowa</option>

<option value="http://www.ksbems.org">Kansas</option>

<option value="http://www.publichealth.state.ky.us/ems.htm">Kentucky</option>

<option value="http://www.dhh.state.la.us/oph/ems.htm">Louisiana</option>

<option value="http://www.state.me.us/dps/ems">Maine</option>

<option value="http://miemss.umaryland,edu/Home.htm">Maryland</option>

<option value="http://www.magenet.state.ma.us/dph.oems.htm">Massachusetts</option>

<option value="http://www.emsmichigan.net">Michigan</option>

<option value="http://www.emsrb.state.mn.us">Minnesota</option>

<option value="http://msdh.state.ms.us/ems/index.htm">Missippi</option>

<option value="http://www.health.state.mo.us">Missouri</option>

<option value="http://www.ophhs.state.mt.us">Montana</option>

<option value="http://www.hhs.state.ne.us/ems/emsindex.htm">Nebraska</option>

<option value="http://health2k.state.nv.us/ems/index.htm">Nevada</option>

<option value="http://www.state.nh.us">New Hampshire</option>

<option value="http://www.state.ny.us/health/ems/hlthems">New Jersey</option>

<option value="http://www.health.state.nm.us">New Mexico</option>

<option value="http://www.health.state.ny.us">New York</option>

<option value="http://www.ncems.org">North Carolina</option>

<option value="http://www.health.state.nd.us">North Dakota</option>

<option value="http://www.state.oh.us/cdps/division/ems/ems_local/default.htm">Ohio</option>

<option value="http://www.health.state.ok.us/programs/ems/index.html">Oklahoma</option>

<option value="http://www.ohd.hr.state.or.us/cehs/ems/">Oregon</option>

<option value="http://www.health.state.pa.us/hpa/ems/default.htm">Pennsylvania</option>

<option value="http://www.health.state.ri.us">Rhode Island</option>

<option value="http://www.scdhec.net/hr/ems">South Carolina</option>

<option value="http://www.state.sd.us">South Dakota</option>

<option value="http://www.state.tn.us/health/ems">Tennessee</option>

<option value="http://www.tdh.state.tx.us/">Texas</option>

<option value="http://www.health.state.ut.us/ems">Utah</option>

<option value="http://www.state.vt.us/health/ems">Vermont</option>

<option value="http://www.vdh.state.va.us/oems">Virginia</option>

<option value="http://www.doh.wa.gov/hsqa.emtp">Washington</option>

<option value="http://www.wvoems.org">West Virginia</option>

<option value="http://www.dhfs.state.wi.us/dph_emsip/index.htm">Wisconsin</option>

<option value="http://wdhfs.state.wy.us/ems" target="_blank">Wyoming</option>

</select>

</div>

</form>
Copy linkTweet thisAlerts:
@PhillMcJan 23.2004 — I notice that 'onChange' you call a function, what is that functions code?
Copy linkTweet thisAlerts:
@ckiskeauthorJan 23.2004 — this is the script dreamweaver produced: I am more of a visual designer - wingin' it with the programming.

<script language="JavaScript" type="text/JavaScript">

<!--

function MM_jumpMenu(targ,selObj,restore){ //v3.0

eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");

if (restore) selObj.selectedIndex=0;

}

//-->

</script>
Copy linkTweet thisAlerts:
@PhillMcJan 23.2004 — K, I'll get on it and find a solution for you. ?
Copy linkTweet thisAlerts:
@ckiskeauthorJan 23.2004 — thank You...

I bug my programmer all the time, i figured i would seek help elsewhere.
Copy linkTweet thisAlerts:
@fredmvJan 23.2004 — &lt;script type="text/javascript"&gt;
//&lt;![CDATA[
function MM_jumpMenu(targ,selObj,restore)
{
var op = selObj.options[selObj.selectedIndex];

<i> </i>if(op.text.toLowerCase() != 'wisconsin')
<i> </i>{
<i> </i> location = op.value;
<i> </i>}

<i> </i>else window.open(op.value, '', '');

<i> </i>if (restore) selObj.selectedIndex = 0;
}
//]]&gt;
&lt;/script&gt;
Copy linkTweet thisAlerts:
@ckiskeauthorJan 23.2004 — oh my gosh you rock!

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.
Copy linkTweet thisAlerts:
@TheBearMayJan 23.2004 — Borrowing from Fredmv, it should be:
[code=php]
<script type="text/javascript">
//<![CDATA[
function MM_jumpMenu(targ,selObj,restore)
{
var op = selObj.options[selObj.selectedIndex];

window.open(op.value, '', '');

if (restore) selObj.selectedIndex = 0;
}
//]]>
</script>[/code]
Copy linkTweet thisAlerts:
@PhillMcJan 23.2004 — DANG IT FRED! You beat me! Well, this is what I got.

<script language="JavaScript" type="text/JavaScript">

<!--

function MM_jumpMenu(targ,selObj,restore){ //v3.0

window.open(selObj.options[selObj.selectedIndex].value)

if (restore) selObj.selectedIndex=0;

}

//-->

</script>



I'll remember that fred!lol

This will always open in new window
Copy linkTweet thisAlerts:
@fredmvJan 23.2004 — Yes &#8212; the two above pieces of code are what you want &#8212; from your sample piece of code it seemed like all you wanted was so the "Wisconsin" option opened in a new window.
Copy linkTweet thisAlerts:
@ckiskeauthorJan 23.2004 — thank you soooo much.
Copy linkTweet thisAlerts:
@PhillMcJan 23.2004 — No Problem, Glad we could help ?
×

Success!

Help @ckiske spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...