06. oktober 2000 - 01:16
#2
Ole :o)
Oki..
Jeg skal lave en side med image maps på et billed.
Når man klikker et sted, så gemmer den det i en streng, 2 sek smider lige scriptet ind.
<!doctype html public \"-//W3C//DTD HTML 4.0 Transitional//EN\">
<html>
<head>
<title> New Document </title>
<script language=\"JavaScript\">
<!--
var a = Array(0,0,0);
function toggle(n) {
if (a[n]) {
document.f.s.options[n].selected=false;
a[n]=0;
} else {
document.f.s.options[n].selected=true;
a[n]=1;
}
}
//-->
</script>
</head>
<body bgcolor=\"#FFFFFF\">
<img src=\"dkort.gif\" usemap=\"#valg\" border=\"0\">
<map name=\"valg\">
<area shape=\"rect\" coords=\"331,7,415,89\" href=\"#\" title=\"\">
<area shape=\"circle\" coords=\"259,77,22\" nohref title=\"\">
<area shape=\"poly\" coords=\"174,28,174,62,218,62,220,51,216,40,232,4,210,7,195,17,184,20,174,27,174,62\" nohref title=\"\">
<area shape=\"poly\" coords=\"221,65,174,65,174,95,178,96,203,118,221,92,221,67\" nohref title=\"\">
<area shape=\"poly\" coords=\"141,100,172,95,172,23,150,50,144,66,127,92\" nohref title=\"\">
<area shape=\"poly\" coords=\"198,137,147,144,150,184,185,184,202,185,197,136\" nohref title=\"\">
<area shape=\"poly\" coords=\"150,185,165,223,203,233,204,185,148,186\" nohref title=\"\">
<area shape=\"poly\" coords=\"204,191,205,209,250,224,258,211,233,188,204,194\" nohref title=\"\">
<area shape=\"poly\" coords=\"205,211,204,231,198,243,221,267,253,248,248,224,204,209\" nohref title=\"\">
<area shape=\"poly\" coords=\"212,268,215,315,235,313,243,283,225,267,213,268\" nohref title=\"\">
<area shape=\"poly\" coords=\"125,93,140,99,139,120,147,143,149,168,111,171,82,98,89,90,128,94\" nohref title=\"\">
<area shape=\"poly\" coords=\"146,167,112,170,118,176,103,180,103,224,164,224,148,185,147,167,113,171\" nohref title=\"\">
<area shape=\"poly\" coords=\"81,97,113,176,102,177,102,177,102,224,54,224,41,184,16,147,55,92,82,99\" nohref title=\"\">
<area shape=\"poly\" coords=\"19,259,53,225,42,182,15,166,8,198,13,243,5,254,5,254,20,260\" nohref title=\"\">
<area shape=\"poly\" coords=\"71,282,71,224,116,225,100,271,71,282\" nohref title=\"\">
<area shape=\"poly\" coords=\"102,270,117,225,165,225,145,253,102,270\" nohref title=\"\">
<area shape=\"poly\" coords=\"145,257,193,286,198,291,184,305,178,325,118,265,145,255\" nohref title=\"\">
<area shape=\"poly\" coords=\"176,324,117,267,99,274,99,311,155,331,176,324,176,324\" nohref title=\"\">
<area shape=\"poly\" coords=\"99,333,100,272,70,282,57,310,99,333\" nohref title=\"\">
<area shape=\"poly\" coords=\"158,333,100,314,100,361,142,361,145,348,158,333\" nohref title=\"\">
<area shape=\"poly\" coords=\"98,360,99,333,57,311,45,334,79,360,99,361\" nohref title=\"\">
<area shape=\"poly\" coords=\"43,333,70,283,24,266,27,286,42,332\" nohref title=\"\">
<area shape=\"poly\" coords=\"71,281,71,225,54,225,19,259,28,267,68,282\" nohref title=\"\">
<area shape=\"poly\" coords=\"44,334,31,346,20,357,1,336,11,279,28,285\" nohref title=\"\">
<area shape=\"poly\" coords=\"77,362,86,396,146,396,158,386,141,363,77,363\" nohref title=\"\">
<area shape=\"poly\" coords=\"151,367,188,364,187,371,203,379,196,412,186,417,180,416,168,404,159,381,151,366\" nohref title=\"\">
<area shape=\"poly\" coords=\"152,365,187,360,187,351,214,341,207,327,195,328,181,330,169,336,166,339,157,342,148,342,152,366\" nohref title=\"\">
<area shape=\"poly\" coords=\"101,453,87,397,145,397,132,408,132,413,139,414,155,410,169,414,175,428,178,447,175,459,154,447,153,456,138,448,109,461,100,451\" nohref title=\"\">
<area shape=\"poly\" coords=\"98,451,76,362,54,375,24,402,38,428,52,443,98,450\" nohref title=\"\">
<area shape=\"poly\" coords=\"57,351,57,365,54,365,39,350,47,350,56,351\" nohref title=\"\">
<area shape=\"poly\" coords=\"59,347,57,351,40,349,43,354,54,365,58,365,57,350,59,347,76,360,52,375,31,376,17,365,35,343,46,336,63,349\" nohref title=\"\">
<area shape=\"poly\" coords=\"239,359,231,390,189,370,187,352,196,354,197,362,205,365,212,358,212,352,208,351,202,353,196,357,192,352,209,344,217,348,220,325,235,323,240,341,238,363\" nohref title=\"\">
<area shape=\"poly\" coords=\"205,365,198,362,198,355,206,352,211,350,213,358,205,365\" nohref title=\"\">
<area shape=\"poly\" coords=\"196,416,205,380,230,392,239,362,261,410,252,457,237,476,217,461,195,460,185,426,197,410\" nohref title=\"\">
<area shape=\"poly\" coords=\"301,283,316,335,274,351,271,327,246,302,257,292,285,299,301,284\" nohref title=\"\">
<area shape=\"poly\" coords=\"300,285,279,261,305,257,334,260,340,285,364,290,361,321,319,336,302,283,298,284\" nohref title=\"\">
<area shape=\"poly\" coords=\"334,260,386,234,409,251,407,262,394,272,366,289,340,285,334,257\" nohref title=\"\">
<area shape=\"poly\" coords=\"304,343,304,395,285,398,276,374,274,350,304,342\" nohref title=\"\">
<area shape=\"poly\" coords=\"304,341,304,396,329,383,334,331,304,342\" nohref title=\"\">
<area shape=\"poly\" coords=\"330,384,397,358,367,340,361,323,334,332,331,383\" nohref title=\"\">
<area shape=\"poly\" coords=\"393,361,399,371,379,391,376,396,410,410,410,426,397,430,390,425,376,443,366,467,357,483,343,484,316,473,326,419,315,391,392,360\" nohref title=\"\">
<area shape=\"poly\" coords=\"316,473,326,419,314,432,285,409,262,425,265,437,256,445,261,454,305,479,316,472,325,419\" nohref title=\"\">
<area shape=\"poly\" coords=\"394,271,364,290,361,321,367,341,377,342,382,332,375,322,376,307,373,296,398,277,388,274\" nohref title=\"\">
<area shape=\"poly\" coords=\"373,296,376,327,419,335,418,310,396,278\" nohref title=\"\">
<area shape=\"poly\" coords=\"197,287,145,254,145,254,166,226,197,233,195,239,190,238,177,236,169,242,176,263,193,266,195,286\" nohref title=\"\">
<area shape=\"poly\" coords=\"195,240,195,267,175,263,166,241,177,236,194,236\" nohref title=\"\">
<area shape=\"poly\" coords=\"202,119,174,96,139,102,142,123,146,142,198,135\" nohref title=\"\">
<area shape=\"rect\" href=\"#\" coords=\"0,0,421,487\">
</map>
<form name=\"f\">
<select name=\"s\" multiple size=\"3\">
<option value=\"0\">Økse</option>
<option value=\"1\">Pære</option>
<option value=\"2\">Komfur</option>
</select>
</form>
</body>
</html>
Så skal jeg bare have lavet sådan at når man klikker på et område, så må den også godt Highlighte det på en eller anden måde som kan ses i både internet explore og netscape.
Jeg kan måske gør det med noget css, men det virker jo kun i IE,.
Hvordan gør jeg?
Med noget Layer control eller noget??
Mvh Etle