Åben link i target vindue
Hej.Jeg har dette script som åbner et link i et nye vindue der bliver valgt i en combo box.
Jeg vil gerne have det åbner i et "target vindue". Hvor ændre jeg det henne?
Som jeg ville gøre i et alm. url link hed det sådan her: target="I1"
Her er mit script, håber der er nogen der kan hjælpe mig.
<script>
<!--
//DEFINE the group of links for display in the combo
//EXTEND each array and its elements as needed
//BE sure to follow the pattern revealed below
var combo1=new Array()
combo1[0]=new Option("DR Indland","http://www.superstart.dk/rsspages/drindland.asp")
combo1[1]=new Option("DR Udland","http://www.superstart.dk/rsspages/drudland.asp")
combo1[2]=new Option("DR Politik","http://www.superstart.dk/rsspages/drpolitik.asp")
combo1[3]=new Option("DR Penge","http://www.superstart.dk/rsspages/drpenge.asp")
combo1[4]=new Option("DR Kriminalitet","http://www.superstart.dk/rsspages/drretpoliti.asp")
var combo2=new Array()
combo2[0]=new Option("CNN","http://www.cnn.com")
combo2[1]=new Option("MSNBC","http://www.msnbc.com")
combo2[2]=new Option("BBC News","http://news.bbc.co.uk")
combo2[3]=new Option("ABC News","http://www.abcnews.com")
var combo3=new Array()
combo3[0]=new Option("Hollywood.com","http://www.hollywood.com")
combo3[1]=new Option("MTV","http://www.mtv.com")
combo3[2]=new Option("ETOnline","http://etonline.com")
var cacheobj=document.dynamiccombo.stage2
function populate(x){
for (m=cacheobj.options.length-1;m>0;m--)
cacheobj.options[m]=null
selectedarray=eval(x)
for (i=0;i<selectedarray.length;i++)
cacheobj.options[i]=new Option(selectedarray[i].text,selectedarray[i].value)
cacheobj.options[0].selected=true
}
function gothere(){
location=cacheobj.options[cacheobj.selectedIndex].value
}
//SHOW first combo by default
populate(combo1)
//-->
</script>
<!--SET up your links, and pass in the name of the group (ie: combo1) you wish to display for the link in question-->
<a href="java script:populate(combo1)">Nyheder</a> | <a href="java script:populate(combo2)">Sport</a> | <a href="java script:populate(combo3)">Finans/Erhverv</a>
| <a href="java script:populate(combo4)">Andet</a>