473,415 Members | 1,566 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,415 software developers and data experts.

code working in internet explorer but not in mozilla

code working in internet explorer but not in mozilla and iam getting erroe like window.event has no properties and here is the code

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<%@taglib uri="/tags/struts-html" prefix="html" %>
<%@taglib uri="/tags/struts-bean" prefix="bean" %>
<%@taglib uri="/tags/struts-logic" prefix="logic" %>
<html:html>
<HEAD>
<logic:present name="AdministratorForm">
<TITLE>Edit User Registration Details</TITLE>
</logic:present>
<logic:notPresent name="AdministratorForm">
<TITLE>User Registration</TITLE>
</logic:notPresent>
<LINK href="<html:rewrite page='/styles/RTStyles.css'/> type="text/css" rel="stylesheet">
<script language="JavaScript" src="<html:rewrite page='/javascript/calendar.js'/>"></script>
<script language="JavaScript" src="<html:rewrite page='/javascript/rtmenu.js'/>"></script>

<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">

<META content="MSHTML 6.00.3790.2759" name=GENERATOR>


<script>

function selectAction(action){
document.forms[0].action=action;
if(validateUserReg()){
document.forms[0].submit();
}
}
</script>

<script>
function userGroupChange(change)
{
if(document.getElementsByName("userGroupId")[0].value=='1')
{
document.getElementsByName("isAdmin")[0].checked=true
document.getElementsByName("isAdmin")[0].disabled=true
document.getElementsByName("isAdmin")[1].value=true
}
if(document.getElementsByName("userGroupId")[0].value=='2')
{
document.getElementsByName("isAdmin")[0].checked=false
document.getElementsByName("isAdmin")[0].disabled=false
document.getElementsByName("isAdmin")[1].value=false
}
if(document.getElementsByName("userGroupId")[0].value=='3')
{
document.getElementsByName("isAdmin")[0].checked=false
document.getElementsByName("isAdmin")[0].disabled=true
document.getElementsByName("isAdmin")[1].value=false
}

}
function userGroupChangeLoad(lchange)
{
if(document.getElementsByName("userGroupId")[0].value=='1')
{
document.getElementsByName("isAdmin")[0].checked=true
document.getElementsByName("isAdmin")[0].disabled=true
document.getElementsByName("isAdmin")[1].value=true
}
if(document.getElementsByName("userGroupId")[0].value=='2')
{
document.getElementsByName("isAdmin")[1].value=false
}
if(document.getElementsByName("userGroupId")[0].value=='3')
{
document.getElementsByName("isAdmin")[0].checked=false
document.getElementsByName("isAdmin")[0].disabled=true
document.getElementsByName("isAdmin")[1].value=false
}
}
function trimField(field)
{
field.value=field.value.replace(/^\s*|\s*$/g,"");
}

function keyPressed(evt){
var charCode = (evt.which) ? evt.which : window.event.keyCode
if(charCode==13 ){
selectAction('<html:rewrite page="/registeruser.do?activity=userInfo"/>')
}
if(window.event.keyCode==13 ){
selectAction('<html:rewrite page="/registeruser.do?activity=userInfo"/>')
}
}
</script>
</HEAD>
<body onkeypress="keyPressed(event)" onLoad="userGroupChangeLoad(this)">

<div align="center">
<table width="774" height="22" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td align="left" valign="top"><table width="774" border="0" align="center" cellpadding="0" cellspacing="8" bordercolor="#333333">

<tr>
<td align="left" valign="top" style="border:#666666 1px solid">
<html:form action="/registeruser.do" focus="firstName" enctype="multipart/form-data">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<logic:notPresent name="AdministratorForm">
<td align="left" colspan="2" valign="middle" bgcolor="#b5b4bf" style="border:#FFFFFF 1px solid" class="style10">User Registration</td>
</logic:notPresent>
<logic:present name="AdministratorForm">
<td align="left" colspan="2" valign="middle" bgcolor="#b5b4bf" style="border:#FFFFFF 1px solid" class="style10">Edit User Registration</td>
</logic:present>
</tr>
<tr><td width="5%">


</td></tr>
<tr><td align="left" class="main_note"><a class="rtstar">*</a> <bean:message key="userRegistration.mandatoryMsg" /></td></tr>
<tr><td align="left" class="main_note">&nbsp;</td></tr>
</table>



<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="21%" align="right" valign="middle">
<logic:messagesPresent message="true" >

<span class="error_msg"><html:messages id="error" message="true" property="userExists">
<bean:write name="error" /></html:messages>
</span></logic:messagesPresent></td></tr>

<tr><td>&nbsp;</td></tr>
<tr>
<logic:messagesPresent message="true" property="firstName">
<td width="20%" height="22" align="right" valign="middle"
class="field_labelError"><bean:message
key="userRegistration.label.firstName" /><a class="rtstar">*</a>
</td>
</logic:messagesPresent>
<logic:messagesNotPresent message="true" property="firstName">
<td width="20%" height="22" align="right" valign="middle"
class="field_label"><bean:message
key="userRegistration.label.firstName" /><a class="rtstar">*</a>
</td>
</logic:messagesNotPresent>
<td width="16%" align="left" valign="middle" class="field_txt"><html:text
property="firstName" styleClass="tableMainInput" maxlength="50"
tabindex="1" size="23" onblur="trimField(this)" />
</td>
<td width="12%"></td>
<logic:messagesPresent message="true" property="userGroupId">
<td width="19%" align="right" height="22" valign="middle"
class="field_labelError"><bean:message
key="userRegistration.label.userGroup" /><a class="rtstar">*</a>
</td>
</logic:messagesPresent>
<logic:messagesNotPresent message="true" property="userGroupId">
<td width="19%" align="right" height="22" valign="middle"
class="field_label"><bean:message
key="userRegistration.label.userGroup" /><a class="rtstar">*</a>
</td>
</logic:messagesNotPresent>
<td width="33%" align="left" valign="middle" class="field_txt">
<html:select property="userGroupId" onchange="userGroupChange(this)" style="width:145px" styleClass="tableMainInput" tabindex="7" >
<html:option value="">------------Select------------</html:option>
<html:options property="key" collection="userGroup"
labelProperty="value" />
</html:select>
</td>
</tr>
<tr><td height="22" align="right" valign="middle" class="field_label"><bean:message
key="userRegistration.label.middleName" />&nbsp;
</td>

<td align="left" valign="top" class="field_txt"><html:text
property="middleName" styleClass="tableMainInput" maxlength="50"
tabindex="2" size="23" onblur="trimField(this)" />
</td>
<td></td>
<td align="right" height="22" valign="middle" class="field_label"><bean:message key="userRegistration.label.admin" /> &nbsp;&nbsp;&nbsp;
</td>
<td align="left" valign="middle"><html:checkbox property="isAdmin" tabindex="8" /><html:hidden property="isAdmin"/>
</td>

</tr>
<tr>

<logic:messagesPresent message="true" property="lastName">
<td height="22" align="right" valign="middle" class="field_labelError"><bean:message key="userRegistration.label.lastName" /><a class="rtstar">*</a></td>
</logic:messagesPresent>
<logic:messagesNotPresent message="true" property="lastName">
<td align="right" height="22" valign="middle" class="field_label"><bean:message key="userRegistration.label.lastName" /><a class="rtstar">*</a></td>
</logic:messagesNotPresent>
<td align="left" valign="top" class="field_txt"><LABEL><html:text property="lastName" styleClass="tableMainInput" maxlength="50" tabindex="3" size="23" onblur="trimField(this)"/></LABEL></td>

<td></td>

<logic:messagesPresent message="true" property="userName">
<td height="22" align="right" valign="middle"
class="field_labelError"><bean:message
key="userRegistration.label.userName" /><a class="rtstar">*</a>
</td>
</logic:messagesPresent>
<logic:messagesNotPresent message="true" property="userName">
<td height="22" align="right" valign="middle"
class="field_label"><bean:message
key="userRegistration.label.userName" /><a class="rtstar">*</a>
</td>
</logic:messagesNotPresent>
<td align="left" valign="top" class="field_txt"><label><html:text
property="userName" styleClass="tableMainInput" tabindex="9"
size="23" maxlength="50" onblur="trimField(this)" /></label>
</td>

</tr>

<tr>
<logic:messagesPresent message="true" property="phoneNumber">
<td align="right" height="22" valign="middle" class="field_labelError"><bean:message key="userRegistration.label.phone" /><a class="rtstar">*</a></td>
</logic:messagesPresent>
<logic:messagesNotPresent message="true" property="phoneNumber">
<td align="right" height="22" valign="middle" class="field_label"><bean:message key="userRegistration.label.phone" /><a class="rtstar">*</a></td>
</logic:messagesNotPresent>
<td align="left" valign="top" class="field_txt"><label><html:text property="phoneNumber" onkeypress="return isPhoneKey(event);" styleClass="tableMainInput" maxlength="15" tabindex="4" size="23" onblur="trimField(this)"/></label></td>
<td></td>
<logic:messagesPresent message="true" property="userPassword">
<td align="right" height="22" valign="middle" class="field_labelError"><bean:message key="userRegistration.label.password" /><a class="rtstar">*</a></td>
</logic:messagesPresent>
<logic:messagesNotPresent message="true" property="userPassword">
<td align="right" height="22" valign="middle" class="field_label"><bean:message key="userRegistration.label.password" /><a class="rtstar">*</a></td>
</logic:messagesNotPresent>
<td align="left" valign="top" class="field_txt"><label><html:password property="userPassword" styleClass="tableMainInput" tabindex="10" size="23" maxlength="50" onblur="trimField(this)"/></label></td>
</tr>
<tr>
<logic:messagesPresent message="true" property="email">
<td align="right" height="22" id="emailErrmsg" valign="middle" class="field_labelError"> <bean:message key="userRegistration.label.email" /><a class="rtstar">*</a></td>
</logic:messagesPresent>
<logic:messagesNotPresent message="true" property="email">
<td align="right" id="emailErrmsg" height="22" valign="middle" class="field_label"> <bean:message key="userRegistration.label.email" /><a class="rtstar">*</a></td>
</logic:messagesNotPresent>
<td align="left" valign="middle" class="field_txt" >

<html:text property="email" onblur="validate(this.value);" styleId="em" styleClass="tableMainInput" maxlength="50" tabindex="5" size="23" /></td>
<td><span id="el" class="invalid_msgError" /></td>



<logic:messagesPresent message="true" property="reTypePassword">
<td align="right" height="22" valign="middle" class="field_labelError"><bean:message key="userRegistration.label.re-TypePassword" /><a class="rtstar">*</a><span id="reTypeErrmsg" /></td>
</logic:messagesPresent>
<logic:messagesNotPresent message="true" property="reTypePassword">
<td align="right" height="22" valign="middle" width="16%" class="field_label"><bean:message key="userRegistration.label.re-TypePassword" /><a class="rtstar">*</a><span id="reTypeErrmsg" /></td>
</logic:messagesNotPresent>
<td align="left" valign="middle" class="field_txt" ><html:password property="reTypePassword" styleClass="tableMainInput" onfocus="overlayclose('reTypePwdError'); return false" onblur="reTypePasswordCheck(userPassword,this);" tabindex="11" size="23" maxlength="50" /> </td>
</tr>
<tr>

<logic:messagesPresent message="true" property="fax">
<td align="right" height="22" valign="middle" class="field_labelError"><bean:message key="userRegistration.label.fax" />&nbsp;</td>
</logic:messagesPresent>
<logic:messagesNotPresent message="true" property="fax">
<td align="right" height="22" valign="middle" class="field_label"><bean:message key="userRegistration.label.fax" />&nbsp;</td>
</logic:messagesNotPresent>
<td align="left" valign="middle" class="field_txt"><label><html:text property="fax" onkeypress="return isPhoneKey(event);" styleClass="tableMainInput" tabindex="6" size="23" onblur="trimField(this)" maxlength="15" /></label></td>
<td></td>
<logic:messagesPresent message="true" property="securityQuestionId">
<td align="right" height="22" valign="top" class="field_labelError"><bean:message key="userRegistration.label.securityQuestion" /><a class="rtstar">*</a></td>
</logic:messagesPresent>
<logic:messagesNotPresent message="true" property="securityQuestionId">
<td align="right" height="22" valign="middle" class="field_label"><bean:message key="userRegistration.label.securityQuestion" /><a class="rtstar">*</a></td>
</logic:messagesNotPresent>
<td align="left" valign="top" class="field_txt">
<html:select property="securityQuestionId" styleClass="tableMainInput" tabindex="12" style="width:145px" >
<html:option value="">--------Select--------</html:option>
<html:options property="key" collection="securityQuestions" labelProperty="value"/>
</html:select></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td></td>
<logic:messagesPresent message="true" property="securityAnswer">
<td align="right" height="22" valign="middle" class="field_labelError"><bean:message key="userRegistration.label.securityAnswer" /><a class="rtstar">*</a></td>
</logic:messagesPresent>
<logic:messagesNotPresent message="true" property="securityAnswer">
<td align="right" height="22" valign="middle" class="field_label"><bean:message key="userRegistration.label.securityAnswer" /><a class="rtstar">*</a></td>
</logic:messagesNotPresent>
<td align="left" valign="middle" class="field_txt"><label><html:text property="securityAnswer" styleClass="tableMainInput" tabindex="13" maxlength="50" size="23" onblur="trimField(this)"/></label></td>




<tr><td colspan="4">&nbsp;</td></tr>
<tr>
<td >&nbsp;</td>
<td >&nbsp;</td>
<logic:present name="AdministratorForm">
<td colspan="2" align="left" valign="middle" style="padding-right:20px"><a tabindex="14" onClick="selectAction('<html:rewrite page="/registeruser.do?activity=userSaveChanges"/>')"><img src="<html:rewrite page="/images/update.gif"/>" border="0" /></a>

<a tabindex="15" onClick="selectAction('<html:rewrite page="/registeruser.do?activity=userDiscardChanges"/>')"><img src="<html:rewrite page="/images/cancelbut.gif"/>" border="0" /></a>
</td>
</logic:present>
<logic:notPresent name="AdministratorForm">
<td colspan="4" align="right" valign="middle" style="padding-right:90px" ><a tabindex="14" onClick="selectAction('<html:rewrite page="/registeruser.do?activity=userInfo"/>')"><img src="<html:rewrite page="/images/next.gif"/>" border="0" /></a>
</td>
</logic:notPresent>
</tr></table>
</html:form></table></td></tr></table></div></body>
<script language="JavaScript" src="<html:rewrite page='/javascript/validations.js'/>"></script>
</html:html>


<DIV id="reTypePwdError" style="position:absolute; display:none; border: 2px solid black; background-color: #e3e3e3; width: 145px; height:auto; padding:5px;vertical-align:top;color:#FF0000;" class="field_txt"></div>
</DIV>
Oct 8 '07 #1
1 2918
dmjpro
2,476 2GB
Buddy ............. try to use Code Tags :-)
I think this is your Bug ..........

Expand|Select|Wrap|Line Numbers
  1. if(window.event.keyCode==13 ){
  2. selectAction('<html:rewrite page="/registeruser.do?activity=userInfo"/>')
  3. }
  4.  
It will not work in Mozilla.

Debasis Jana
Oct 8 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: esrkq | last post by:
Hi, I am looking at a way to return IP related information of a visitor loading a web page and found the following snippet of code: if(navigator.javaEnabled() && (navigator.appName !=...
2
by: David | last post by:
After getting some help working through my bugs, I have what seems to be a robust, working word counter script. I post it here to benefit others that might want this in the future and so that if I...
2
by: Yurij Nykon | last post by:
Hi all. How can I detect the version of Flash-Plugin installed in Internet Explorer? In Netscape i can do this with following java script navigator.plugins.description But it doesn't works...
2
by: ross | last post by:
I looking for a code that will give a site viewer the chance to make the current page the home page in their browser. Seems that I have seen that but can not recall it. Any advice, please? I...
4
by: Bob Sanderson | last post by:
I have a script that reads the computer date and writes it to a copyrite footer on a web page. The idea is to avoid having to update each page manually at the start of a new year. It works fine...
3
by: mr_burns | last post by:
hi, i am using the following code which works well in internet explorer but not in firefox (and perhaps others too): var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async="false";...
0
by: davidr | last post by:
Hi, I have in my behind code a user control with the following in Page Load: this.btn.Attributes.Add("onclick", "SetDivder(" + this.divContainer.ClientID + ");"); In Internet Explorer I...
1
by: ajaysoniji | last post by:
Hi, I am using this code to read the option values from a select option. I am getting the reference of that select option in arg1. Its working fine with mozilla firefox but not with Internet...
14
by: menakasrinivasagam | last post by:
my coding is working in mozilla firefox.but not working in Internet explorer.plz give suggestion to rectify this problem
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.