<SCRIPT LANGUAGE="JavaScript">
function noEntry()
{
mt=document.form1.consultantid.value;
if ((mt.length<1)||(mt.substring(0,6)=="******")) {
alert("I'm sorry. A username is needed.");
document.form1.consultantid.focus();
return false;
}
mt=document.form1.fname.value;
if ((mt.length<1)||(mt.substring(0,6)=="******")) {
alert("I'm sorry. A first name is needed.");
document.form1.fname.focus();
return false;
}
mt=document.form1.lname.value;
if ((mt.length<1)||(mt.substring(0,6)=="******")) {
alert("I'm sorry. A surname is needed.");
document.form1.lname.focus();
return false;
}
else { return true; }
}
// End -->
</SCRIPT>
I get an error:
Line 102, Char 42.
My HTML
__________________________________________________ ______
<form name="form1" method="post" action="editadminuser3.asp" onsubmit="return noEntry()">
<input name="agencyid" type="hidden" value="<%=agencyid%>">
<input name="agencyname" type="hidden" value="<%=agencyname%>">
<input name="edituser" type="hidden" value="<%=edituser%>">
<table width="100%" bgcolor="#ececec" border="0" bordercolor="#000000" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="16" bgcolor="#ECECEC" bordercolor="#ececec"><img src="images/top_lefbb.gif" width="16" height="16"></td>
<td height="16" bgcolor="#ECECEC" background="images/top_midbb.gif" bordercolor="#ececec"><img src="images/top_midbb.gif" width="16" height="16"></td>
<td width="24" bgcolor="#ECECEC"><img src="images/top_rigbb.gif" width="24" height="16"></td>
</tr>
<tr>
<td width="16" background="images/cen_lef.gif"><img src="images/cen_lef.gif" width="16" height="11"></td>
<td>
<Table width="100%" border="1" bordercolor="#000000" align="center" cellpadding="0" cellspacing="0">
<tr bgcolor="#006699" bordercolor="#000000">
<Td colspan="7" align="left"><b><%=trim(rs("f_name"))%> <%=tr im(rs("l_name"))%> Details </b></td>
</tr>
<tr bgcolor="#ECECEC" bordercolor="#ececec">
<td width="197" align="center">Username</td>
<td width="195" align="center">FirstName</td>
<td width="186" align="center">LastName</td>
<td width="203" align="center">Password</td>
</tr>
<tr bgcolor="#ececec" bordercolor="#ececec">
<td >
<div align="center">
<input type="text" name="consultantid" size=10 value="<%=trim(rs("username"))%>">
</div></td>
<td ><div align="center">
<input type="text" name="fname" size=15 value="<%=trim(rs("f_name"))%>">
</div></td>
<td ><div align="center">
<input type="text" name="lname" size=15 value="<%=trim(rs("l_name"))%>">
</div></td>
<td align="center">
<input type="type" name="password" size=10 value="<%=trim(rs("password"))%>">
</td>
</tr>
<tr bgcolor="#ececec" bordercolor="#ececec">
<td colspan="5">
Allow Administration Access
<input type="checkbox" name="admin_access"
<% if trim(rs("admin_access")) = "yes" then response.write(" checked")%>
></input></td>
</tr>
<tr bordercolor="#ececec" bgcolor="#ececec">
<td colspan="5"><div align="center">
<input type="button" name="edit_user" value="Edit User" onmouseover="style.cursor='hand'" onclick="if (noEntry()){document.form1.submit();}'">
<input type="button" name="back" value="Back" onmouseover="style.cursor='hand'" onclick="history.back();">
</div></td>
</tr>
</table>
</td>
<td width="24" background="images/cen_rigBB.gif" bgcolor="#ECECEC"><img src="images/cen_rigBB.gif" width="24" height="11"></td>
</tr>
<tr bgcolor="#ECECEC">
<td width="16" height="16"><img src="images/bot_lefbb.gif" width="16" height="16"></td>
<td height="16" bgcolor="#ECECEC" background="images/bot_midbb.gif"><img src="images/bot_midbb.gif" width="16" height="16"></td>
<td width="24" height="16" bgcolor="#ECECEC"><img src="images/bot_rigbb.gif" width="24" height="16"></td>
</tr>
</table>
<p> </p>
</form>
www.crmpicco.co.uk