• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Any JavaScript Gurus out there?

tjmaxwell

Golden Member
Hi all,

I'm pulling my hair out trying to get this function working in Netscape. All I want to do is get form fields to submit when the user presses Enter in Netscape. I know there are much easier solutions out there, but this page uses XSL with different templates being called from all over, so there are multiple form tags and templates in any given form. The following function works fine in IE, but when I tab through the fields in Netscape 7.2, I get "error: event is undefined." Here's the code:

function initializeSubmitOnEnter(formAction) {
for (i = 0; i < document.forms.length; i++) {
if(document.forms.name != 'subscribeform') {
document.forms.onkeydown = function() {
if(event.keyCode == 13 && clicked == false) {
clicked = true;
eval(formAction);
}
};
}
}
}


Can anyone help?
 
Back
Top