2017-05-31 3 views
0

Der Code unten funktioniert auf Google Chrome und Firefox, aber nicht auf Internet Explorer 11. Ich habe ein Bild und ich habe ein Mapping dafür erstellt. Ich habe verschiedene Möglichkeiten ausprobiert, um ein Formular einzureichen und die JavaScript-Funktion aufzurufen. Ich habe bemerkt, dass das Mapping nur funktioniert, wenn ich einen Button habe, aber dann funktioniert das Senden des Formulars nicht. Bei Verwendung von button type = "submit" wird immer noch nicht gesendet, aber die JavaScript-Funktion wird aufgerufen.Internet Explorer senden Formular funktioniert nicht

Ich möchte ein Mapping eines Bildes und das Formular wird eingereicht und die JavaScript-Funktion wird aufgerufen.

<div> 
    <img src="keys.jpg;" height="480" width="640" border="1" usemap="#keysmapping"> 
    <map name="keysmapping"> 

    <form method=GET> 
    <input type="submit" name="key" value="2" onclick="setTimeout('updateImage();',100);"><area class="one" shape="rect" coords="0,0,90,85"></input> 
    </form> 

    <form method=GET> 
    <button type="submit" name="key" value="3" onclick="setTimeout('updateImage();',100);"><area class="two" shape="rect" coords="95,0,195,85"></button> 
    </form> 

    <form method=GET> 
    <input type="text" name="key" value="4"> 
    <button onclick="setTimeout('updateImage();',100);"><area class="three" shape="rect" coords="195,0,290,85"></button> 
    </form> 
    </map> 
</div> 

+1

was ist der 'updateImage()' Funktion? – TheDarkKnight

+0

Dies ist meine JavaScript-Funktion. rleenaerts

+0

sind Sie sicher, Sie haben Skripte aktiviert in' Internet Explorer' Einstellungen – TheDarkKnight

Antwort

0

für 2 Tage Nach dem Versuch fand ich für das Problem eine Lösung.

Ich denke, es hatte mit dem Design des HTML zu tun und jetzt bin ich manuell das Formular absenden.

<form method="get" name="myFormOne"> 
     <input type="text" name="key" value="2"> 
     <area alt="One" shape="rect" coords="0,0,95,110" onclick="document.myFormOne.submit();setTimeout('updateImage()',100);"> 
    </form> 

    <form method="get" name="myFormTwo"> 
     <input type="text" name="key" value="3"> 
     <area alt="Two" shape="rect" coords="96,0,210,110" onclick="document.myFormTwo.submit();setTimeout('updateImage()',100);"> 
    </form> 

    <form method="get" name="myFormThree"> 
     <input type="text" name="key" value="4"> 
     <area alt="Three" shape="rect" coords="211,0,310,110" onclick="document.myFormThree.submit();setTimeout('updateImage()',100);"> 
    </form> 
</map> 
Verwandte Themen