Hi...
ich möchte mit php eine imagemap machen aber ich bekomme nicht raus warum es nicht klappt. Es gelangen keine Links auf das Bild.
Hier mein code:
der vom internet explorer erzeugte Quellcode sieht auch gut aus, aber es klappt nicht...
Bitte um Hilfe
ich möchte mit php eine imagemap machen aber ich bekomme nicht raus warum es nicht klappt. Es gelangen keine Links auf das Bild.
Hier mein code:
Code:
<?PHP include('config.php'); $offset_x=10; $offset_y=100; $breite = 50; $hoehe = 50; ?> <html> <head> <title>Text des Titels</title> </head> <body> <div> <map name="Karte"> <? $h = 1; while($h <= $hoehe) { $b = 1; while($b <= $breite) { ?> <area shape="rect" coords"<? echo $b ?>, <? echo $h ?>, <? echo $b+9 ?>, <? echo $h+9 ?>" href="http://www.ppppppp.de" alt="Test"> <? $b = $b+10; } $h = $h+10; } ?> </map></div> <div style="position: absolute; z-index: 1; left: <? echo $offset_x ?>px; top: <? echo $offset_y ?>px" id="Ebene1"> [img]images/maps/e40_ger.gif[/img]</p></div> </body> </html>
Code:
<html> <head> <title>Text des Titels</title> </head> <body> <div> <map name="Karte"> <area shape="rect" coords"1, 1, 10, 10" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"11, 1, 20, 10" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"21, 1, 30, 10" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"31, 1, 40, 10" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"41, 1, 50, 10" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"1, 11, 10, 20" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"11, 11, 20, 20" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"21, 11, 30, 20" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"31, 11, 40, 20" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"41, 11, 50, 20" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"1, 21, 10, 30" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"11, 21, 20, 30" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"21, 21, 30, 30" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"31, 21, 40, 30" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"41, 21, 50, 30" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"1, 31, 10, 40" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"11, 31, 20, 40" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"21, 31, 30, 40" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"31, 31, 40, 40" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"41, 31, 50, 40" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"1, 41, 10, 50" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"11, 41, 20, 50" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"21, 41, 30, 50" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"31, 41, 40, 50" href="http://www.ppppppp.de" alt="Test"> <area shape="rect" coords"41, 41, 50, 50" href="http://www.ppppppp.de" alt="Test"> </map></div> <div style="position: absolute; z-index: 1; left: 10px; top: 100px" id="Ebene1"> [img]images/maps/e40_ger.gif[/img]</p></div> </body> </html>
Kommentar