![]() |
SELFHTML Forumsarchiv |
|
|
Die folgende Nachricht zum Thema stammt von: Simone, 31. 08. 2006, 14:58
HI,
Ich habe ein Problem mit Mozilla
Mein Code soll die aktuelle Maus Position ermitteln um später ein Hilfe Popup zu positionieren
Jedoch ist im Mozilla keine Eingabe der Input-Felder möglich.
Danke Simone
<html><head><title>Test</title>
<script type="text/javascript">
function mdown1(e){
aktiv = this;
aktivY = (e) ? e.pageY : event.clientY + document.body.scrollTop;
// alert(aktivY);
var Text = document.createTextNode(aktivY +" |");
document.getElementById("zeigY").appendChild(Text);
return false;
}
function init() {
the_fields = (document.layers) ? document.layers :
(document.all) ? document.all.tags('FIELDSET') :
document.getElementsByTagName('FIELDSET');
for (i=0; i<the_fields.length; i++)
{
if (the_fields[i].captureEvents) // Netscape 4
{the_fields[i].captureEvents(Event.MOUSEDOWN);}
the_fields[i].onmousedown = mdown1;
}
}
window.onload = init;
</script>
</head><body>
<FORM NAME="form" action="#" METHOD="post" >
<div id="zeigY"></div>
<fieldset id=0>
<legend ><b>Name</b></legend>
<input type="Text" name="ff" value="" size="60" maxlength="60">
</fieldset>
<fieldset id=1 >
<legend ><b>Vorname</b></legend>
<input type="Text" name="ff" value="" size="60" maxlength="60">
</fieldset>
</form>
</body>
</html>
Die folgende Nachricht zum Thema stammt von: frankx, 31. 08. 2006, 18:26
Hellihello
vielleicht hilft es, die Inputfelder zu schließen?
<input ... />
statt <input...>?
frankx
Die folgende Nachricht zum Thema stammt von: Simone, 31. 08. 2006, 18:47
Hi, frankx
Nein, das ist es nicht
Ich denke es hat was mit der Schleife zutun:
for (i=0; i<the_fields.length; i++)
{
if (the_fields[i].captureEvents) // Netscape 4
{the_fields[i].captureEvents(Event.MOUSEDOWN);}
the_fields[i].onmousedown = mdown1;
}
Alle FIELDSET bekommen ein onmousedown und das geht irgendwie nicht.
Simone
© 1998-2006
Impressum, Software: Classic Forum