HighDots Forums  

IE crash bei Event.observe(...)

Javascript (German) Programmiersprache JavaScript. (de.comp.lang.javascript)


Discuss IE crash bei Event.observe(...) in the Javascript (German) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Reinhard Pagitsch
 
Posts: n/a

Default IE crash bei Event.observe(...) - 06-04-2007 , 06:16 AM






Hallo,

Folgende JS Funktion wird im body onload verwendet:
function InitkeycodesVariable()
{
// Variable is the name of the Selection list
Event.observe('Variable', 'keypress', function(event) {
if(!event) event=window.event;
if(event.keyCode=='13') {
document.forms["Standard"].submit(); // submit des Formulares
}

});

}

Damit soll bei einem Select tag möglich sein mittels Tastatur zu
navigieren und beim Drücken der Enter Taste soll das Formular
abgeschickt werden.

Irgendwie crasht der IE bei Event.observe(...). (Ich hab nämlich
versucht die beiden if statements auszukommentieren,es ist das gleiche:
IE crash) Mit dem FF funktioniert es wunderbar.
Dummerweise crasht aber der IE nicht auf jedem PC sondern nur auf
manchen. Hat bitte jemand eine Idee was da falsch läuft.

Ausprobiert wurde mit Prototype.js Version 1.5.1 und 1.4.0.

Wenn es noch andere Möglichkeiten gibt bitte diese auch angeben.

Danke,
Reinhard

--
PM Mails an rpirpag <at> gmx dot at

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.