Ja, og husk å se etter store og små bogstaver i argumentene
eg.
PopulateList('Fyn')
if (Place == 'fyn')
og i arrays skal den siste i indexen ikke ha komma etter seg
eg.
['
http://www.denmark.com/?Place=5','Ishøj'],
['
http://www.denmark.com/?Place=6','Holeby']
Prøv å kopier koden inn i din fil nå (se under)
Thomas
<!-- START -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled</title>
<script language="JavaScript">
function PopulateList(Place) {
if (Place == 'nordJutland') {
var ItemList = [ ['
http://www.denmark.com/?Place=1','Aalborg'],
['
http://www.denmark.com/?Place=2','Frederikshavn'],
['
http://www.denmark.com/?Place=3','Hirtshals'],
['
http://www.denmark.com/?Place=4','Hadsund'],
['
http://www.denmark.com/?Place=5','Hjørring'],
['
http://www.denmark.com/?Place=6','Nibe'],
['
http://www.denmark.com/?Place=7','Hobro'],
['
http://www.denmark.com/?Place=8','Nørresundby']
];
}
else if (Place == 'vestJutland') {
var ItemList = [ ['
http://www.denmark.com/?Place=1','Holstebro'],
['
http://www.denmark.com/?Place=2','Struer'],
['
http://www.denmark.com/?Place=3','Thisted'],
['
http://www.denmark.com/?Place=4','Skive'],
['
http://www.denmark.com/?Place=5','Ringkøbing'],
['
http://www.denmark.com/?Place=6','Videbæk'],
['
http://www.denmark.com/?Place=7','Varde'],
['
http://www.denmark.com/?Place=8','Roslev']
];
}
else if (Place == 'midtJutland') {
var ItemList = [ ['
http://www.denmark.com/?Place=1','Billund'],
['
http://www.denmark.com/?Place=2','Bredsten'],
['
http://www.denmark.com/?Place=3','Thisted'],
['
http://www.denmark.com/?Place=4','Brande'],
['
http://www.denmark.com/?Place=5','Fredericia'],
['
http://www.denmark.com/?Place=6','Herning'],
['
http://www.denmark.com/?Place=7','Randbøl'],
['
http://www.denmark.com/?Place=8','Vejle']
];
}
else if (Place == 'ostJutland') {
var ItemList = [ ['
http://www.denmark.com/?Place=1','Århus'],
['
http://www.denmark.com/?Place=2','Odder'],
['
http://www.denmark.com/?Place=3','Grenå'],
['
http://www.denmark.com/?Place=4','Randers'],
['
http://www.denmark.com/?Place=5','Skanderborg'],
['
http://www.denmark.com/?Place=6','Silkeborg'],
['
http://www.denmark.com/?Place=7','Viborg'],
['
http://www.denmark.com/?Place=8','Ebeltoft']
];
}
else if (Place == 'sydJutland') {
var ItemList = [ ['
http://www.denmark.com/?Place=1','Aabenraa'],
['
http://www.denmark.com/?Place=2','Esbjerg'],
['
http://www.denmark.com/?Place=3','Haderslev'],
['
http://www.denmark.com/?Place=4','Kolding'],
['
http://www.denmark.com/?Place=5','Ribe'],
['
http://www.denmark.com/?Place=6','Tønder'],
['
http://www.denmark.com/?Place=7','Vojens'],
['
http://www.denmark.com/?Place=8','Sønderborg']
];
}
else if (Place == 'Fyn') {
var ItemList = [ ['
http://www.denmark.com/?Place=1','Aarup'],
['
http://www.denmark.com/?Place=2','Glamsbjerg'],
['
http://www.denmark.com/?Place=3','Assens'],
['
http://www.denmark.com/?Place=4','Middelfart'],
['
http://www.denmark.com/?Place=5','Odense'],
['
http://www.denmark.com/?Place=6','Svendborg'],
['
http://www.denmark.com/?Place=7','Nyborg'],
['
http://www.denmark.com/?Place=8','Kerteminde']
];
}
else if (Place == 'storZealand') {
var ItemList = [ ['
http://www.denmark.com/?Place=1','Dianalund'],
['
http://www.denmark.com/?Place=2','Haslev'],
['
http://www.denmark.com/?Place=3','Herfølge'],
['
http://www.denmark.com/?Place=4','Holbæk'],
['
http://www.denmark.com/?Place=5','Køge'],
['
http://www.denmark.com/?Place=6','Næstved'],
['
http://www.denmark.com/?Place=7','Roskilde'],
['
http://www.denmark.com/?Place=8','Slagelse'],
['
http://www.denmark.com/?Place=9','Vordingborg']
];
}
else if (Place == 'nordZealand') {
var ItemList = [ ['
http://www.denmark.com/?Place=1','Ølsted'],
['
http://www.denmark.com/?Place=2','Ølstykke'],
['
http://www.denmark.com/?Place=3','Birkerød'],
['
http://www.denmark.com/?Place=4','Farum'],
['
http://www.denmark.com/?Place=5','Melby'],
['
http://www.denmark.com/?Place=6','Helsingør'],
['
http://www.denmark.com/?Place=7','Allerøde'],
['
http://www.denmark.com/?Place=8','Frederiksund']
];
}
else if (Place == 'stkbh') {
var ItemList = [ ['
http://www.denmark.com/?Place=1','København'],
['
http://www.denmark.com/?Place=2','Brøndby'],
['
http://www.denmark.com/?Place=3','Hvidovre'],
['
http://www.denmark.com/?Place=4','Rødovre'],
['
http://www.denmark.com/?Place=5','Ishøj'],
['
http://www.denmark.com/?Place=6','Gentofte'],
['
http://www.denmark.com/?Place=7','Glostrup'],
['
http://www.denmark.com/?Place=8','Kgs Lyngby']
];
}
else if (Place == 'lf') {
var ItemList = [ ['
http://www.denmark.com/?Place=1','Nykøbing F'],
['
http://www.denmark.com/?Place=2','Øster Ulslev'],
['
http://www.denmark.com/?Place=3','Eskilstrup'],
['
http://www.denmark.com/?Place=4','Rødby'],
['
http://www.denmark.com/?Place=5','Ishøj'],
['
http://www.denmark.com/?Place=6','Holeby']
];
}
else if (Place == 'bornholm') {
var ItemList = [ ['
http://www.denmark.com/?Place=1','Rønne']
];
}
var GetPlace = '';
for (i = 0; i < ItemList.length; i++) {
GetPlace += '<a href="' + ItemList[i][0] + '">' + ItemList[i][1] + '</a><br>\n';
}
document.getElementById('TheList').innerHTML = GetPlace;
}
</script>
</head>
<body bgcolor="#333333" text="#FF0000">
<div align="center"><img src="
http://cynide-lynide.dk/files/da-mapcopy.jpg" width="289" height="343" alt="" border="0" usemap="#map">
<map name="map">
<area shape="RECT" coords="26,42,28,40">
<area alt="stkbh" coords="167,184,188,219" href="java script:PopulateList('stkbh');">
<area alt="storZealand" coords="128,221,183,246" href="java script:PopulateList('storZealand');">
<area alt="storZealand" coords="124,185,168,220" href="java script:PopulateList('storZealand');">
<area alt="lf" coords="123,245,171,276" href="java script:PopulateList('lf');">
<area alt="nordZealand" coords="136,155,188,185" href="java script:PopulateList('nordZealand');">
<area alt="vestJutland" coords="15,87,47,217" href="java script:PopulateList('vestJutland');">
<area alt="midtJutland" coords="48,120,80,214" href="java script:PopulateList('midtJutland');">
<area alt="nordJutland" coords="49,37,143,119" href="java script:PopulateList('nordJutland');">
<area alt="fyn" coords="82,196,123,247" href="java script:PopulateList('Fyn');">
<area alt="ostJutland" coords="81,118,124,189" href="java script:PopulateList('ostJutland');">
<area alt="sydJutland" coords="23,216,77,259" href="java script:PopulateList('sydJutland');">
<area alt="bornholm" coords="237,216,291,244" href="java script:PopulateList('bornholm');">
</map>
</div>
<div id="TheList" style="border:1px solid #000000"></div>
</body>
</html>
<!-- SLUTT -->