By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,136 Members | 1,212 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,136 IT Pros & Developers. It's quick & easy.

Validator error message label becomes editable - Bug

P: n/a
I have a textbox to enter an email address followed by a telephone textbox.
The email has a regularexpressionvalidator and a requiredfieldvalidator. The
ReqField works fine, but if I put in an invalid email addy then click in the
telephone field below, something very odd happens.
The telephone label & textbox (and all controls below) shift down one line,
and rather than having my cursor in the telephone textbox. The cursor is in
the label. I can now type in text in the label.. Has anyone experienced such
a problem.
The code of the page is pasted below

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>MailForm</title>
<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
</HEAD>
<body bgColor="#fff5ef" leftMargin="0" topMargin="12" marginwidth="0"
marginheight="0">
<form id="MailForm" method="post" runat="server">
<table cellSpacing="0" cellPadding="0" width="95%" align="center"
border="0">
<tr align="middle" bgColor="#fde1ce">
<td colSpan="2" height="25"><b><font face="Verdana, Arial, Helvetica,
sans-serif" color="#cc0000" size="3"<center>Provinciaal Instituut voor
Brandweer -
en&nbsp; Ambulancieropleiding
<CENTER></CENTER></font></b>
</td>
</tr>
<tr>
<td bgColor="#ffffff">
<table cellSpacing="1" cellPadding="3" width="700" align="center"
border="0">
<tr>
<td width="277" bgColor="#ffffff"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2">Welk
type opmerking wilt u verzenden?</font></td>
<td width="408" bgColor="#f3f3f3"><asp:radiobuttonlist
id="RbmailType" runat="server" Font-Size="12px" Font-Names="Verdana"
RepeatDirection="Horizontal">
<asp:listitem id="RbCompliment" runat="server" text="Compliment"
value="Compliment" Selected="True" />
<asp:listitem id="RbSuggestie" runat="server" text="Suggestie"
value="Suggestie" />
<asp:listitem id="RbProbleem" runat="server" text="Probleem"
value="Probleem" />
<asp:listitem id="RbKlacht" runat="server" text="Klacht"
value="Klacht" />
</asp:radiobuttonlist></td>
</tr>
<tr>
<td width="277" bgColor="#ffffff"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2">Department:</font></td>
<td width="408" bgColor="#f3f3f3"><asp:radiobuttonlist id="RbType"
runat="server" Font-Size="12px" Font-Names="Verdana"
RepeatDirection="Horizontal">
<asp:listitem id="option1" runat="server" text="Ambulancier"
value="Ambulancier" Selected="True" />
<asp:listitem id="option2" runat="server" text="Medisch"
value="Medisch" />
<asp:listitem id="option3" runat="server" text="Brandweer"
value="Brandweer" />
</asp:radiobuttonlist></td>
</tr>
<tr>
<td width="277" bgColor="#ffffff"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2">Over
welk onderwerp wilt u een opmerking maken?</font></td>
<td valign="center" width="408" bgColor="#f3f3f3"><font
face="Verdana, Arial, Helvetica, sans-serif" size="2"><select id="Select1"
size="1" name="Onderwerp" runat="server">
<option>DGH cursus</option>
<option>Permanente Vorming</option>
<option>Brandweer</option>
<option>PIBA Algemene</option>
<option>Deze Website</option>
<option>Werknemer/lesgever</option>
<option selected>(Andere)</option>
</select></font> <asp:Label ID="lblAnderonderwerp" Runat="server"
Height=23>Ander onderwerp</asp:Label> <input id="Text1" maxLength="256"
size="15" name="AnderOnderwerp" runat="server"></FONT>
</td>
</tr>
<tr>
<td width="277" bgColor="#ffffff"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2">Typ
uw opmerkingen in het vak hieronder:</font></td>
<td width="408" bgColor="#f3f3f3"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2"><textarea id="TEXTAREA1" name="Opmerkingen"
rows="5" cols="47" runat="server"></textarea>
</font>
</td>
</tr>
<tr>
<td width="277" bgColor="#ffffff"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2">Wenst
u opgenomen te worden in de mailinglist nieuwe Permanente
Vormingen?</font></td>
<td width="408" bgColor="#f3f3f3"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2"> <input type="radio" value="Ja"
name="Mailinglist">
Ja <input type="radio" CHECKED value="Nee" name="Mailinglist">
Nee </font>
</td>
</tr>
<tr>
<td width="277" bgColor="#ffffff"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2">Hoe
kunnen we contact met u opnemen?</font></td>
<td bgColor="#f3f3f3">
<table>

<tr>
<td><asp:label id="lblNaam" Font-Size="12px"
Font-Names="Verdana" Runat="server">Naam</asp:label></td>
<td><asp:textbox id="txtNaamGebruiker" Font-Size="12px"
Font-Names="Verdana" Runat="server" Width="245"></asp:textbox><font
color="#ff0000">*
</font><font face="Verdana, Arial, Helvetica, sans-serif"
size="2">Vereist </font>
<asp:requiredfieldvalidator id="chktxtNaam" Width=250
Runat="server" ControlToValidate="txtNaamGebruiker" Display="Dynamic"
ErrorMessage="The naam field should not be
empty"></asp:requiredfieldvalidator></td>
</tr>
<tr>
<td><asp:label id="lblEmail" Font-Size="12px"
Font-Names="Verdana" Runat="server">E-mail</asp:label></td>
<td><asp:textbox id="txtEmailGebruiker" Runat="server"
Font-Size="12px" Font-Names="Verdana" Width="245"></asp:textbox><font
color="#ff0000">*
</font><font face="Verdana, Arial, Helvetica, sans-serif"
size="2">Vereist </font>
<asp:requiredfieldvalidator Width=50 id="ChkEmail"
runat="server" ControlToValidate="txtEmailGebruiker" Display="Dynamic"
ErrorMessage="Please Enter Email"></asp:requiredfieldvalidator>
<asp:regularexpressionvalidator Width=154
id="Regularexpressionvalidator1" runat="server"
ControlToValidate="txtEmailGebruiker" ErrorMessage="InCorrect Email Address."
display="dynamic"
ValidationExpression="^[\w\.\-_]+@([\w\.\-_]+\.)+[A-Za-z]{2,4}$"></asp:regularexpressionvalidator></td>
</tr>
<tr>
<td><asp:label id="lblTelephone" Font-Size="12px"
Font-Names="Verdana" Runat="server">Telefoon</asp:label></td>
<td><asp:textbox id="txtTelGebruiker" Font-Size="12px"
Font-Names="Verdana" Runat="server" Width="245"></asp:textbox></td>
</tr>
<tr>
<td><font face="Verdana, Arial, Helvetica, sans-serif"
size="2">Fax </font>
<td><asp:textbox id="txtFaxGebruiker" Font-Size="12px"
Font-Names="Verdana" Runat="server" Width="245"></asp:textbox>
</td>
</tr>

</table>
</td>
</tr>
<tr>
<td width="277" bgColor="#ffffff"> </td>
<td width="408" bgColor="#f3f3f3"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2"><input id="ChkContactGewenst" type="checkbox"
value="ContactGewenst" name="ContactGewenst" runat="server">
Neem hierover zo snel mogelijk contact met mij op. </font>
</td>
</tr>
<!--<tr>
<td width="277" bgColor="#ffffff"> </td>
<td width="408" bgColor="#f3f3f3"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2"><input id="Radio1" type="radio"
value="Ambulancier" name="Mailinglist" runat="server">
Ambulancier <input id="Radio2" type="radio" value="Medisch"
name="Mailinglist" runat="server">
</font><font face="Verdana, Arial, Helvetica, sans-serif"
size="2">Medisch <input id="Mailinglist" type="radio" value="Brandweer"
name="Mailinglist" runat="server">
Brandweer</font></td>
</tr>-->
<tr>
<td width="277" bgColor="#ffffff"> </td>
<td align="middle" width="408" bgColor="#f3f3f3"><font
face="Verdana, Arial, Helvetica, sans-serif" size="2"><input id="Submit1"
style="WIDTH: 185px; HEIGHT: 24px" type="submit" value="Opmerkingen
verzenden" name="submit" runat="server">
<input id="Reset1" style="WIDTH: 185px; HEIGHT: 24px" type="reset"
value=" Formulier wissen " name="reset" runat="server">
</font>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
</form>
</body>
</HTML>
Thanks in advance

Venki
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
search this NG... there was a discussion on similar problem a few days back.

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"Venki" <Ve***@discussions.microsoft.com> wrote in message
news:3D**********************************@microsof t.com...
I have a textbox to enter an email address followed by a telephone textbox. The email has a regularexpressionvalidator and a requiredfieldvalidator. The ReqField works fine, but if I put in an invalid email addy then click in the telephone field below, something very odd happens.
The telephone label & textbox (and all controls below) shift down one line, and rather than having my cursor in the telephone textbox. The cursor is in the label. I can now type in text in the label.. Has anyone experienced such a problem.
The code of the page is pasted below

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>MailForm</title>
<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
</HEAD>
<body bgColor="#fff5ef" leftMargin="0" topMargin="12" marginwidth="0"
marginheight="0">
<form id="MailForm" method="post" runat="server">
<table cellSpacing="0" cellPadding="0" width="95%" align="center"
border="0">
<tr align="middle" bgColor="#fde1ce">
<td colSpan="2" height="25"><b><font face="Verdana, Arial, Helvetica,
sans-serif" color="#cc0000" size="3"<center>Provinciaal Instituut voor
Brandweer -
en&nbsp; Ambulancieropleiding
<CENTER></CENTER></font></b>
</td>
</tr>
<tr>
<td bgColor="#ffffff">
<table cellSpacing="1" cellPadding="3" width="700" align="center"
border="0">
<tr>
<td width="277" bgColor="#ffffff"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2">Welk
type opmerking wilt u verzenden?</font></td>
<td width="408" bgColor="#f3f3f3"><asp:radiobuttonlist
id="RbmailType" runat="server" Font-Size="12px" Font-Names="Verdana"
RepeatDirection="Horizontal">
<asp:listitem id="RbCompliment" runat="server" text="Compliment"
value="Compliment" Selected="True" />
<asp:listitem id="RbSuggestie" runat="server" text="Suggestie"
value="Suggestie" />
<asp:listitem id="RbProbleem" runat="server" text="Probleem"
value="Probleem" />
<asp:listitem id="RbKlacht" runat="server" text="Klacht"
value="Klacht" />
</asp:radiobuttonlist></td>
</tr>
<tr>
<td width="277" bgColor="#ffffff"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2">Department:</font></td>
<td width="408" bgColor="#f3f3f3"><asp:radiobuttonlist id="RbType"
runat="server" Font-Size="12px" Font-Names="Verdana"
RepeatDirection="Horizontal">
<asp:listitem id="option1" runat="server" text="Ambulancier"
value="Ambulancier" Selected="True" />
<asp:listitem id="option2" runat="server" text="Medisch"
value="Medisch" />
<asp:listitem id="option3" runat="server" text="Brandweer"
value="Brandweer" />
</asp:radiobuttonlist></td>
</tr>
<tr>
<td width="277" bgColor="#ffffff"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2">Over
welk onderwerp wilt u een opmerking maken?</font></td>
<td valign="center" width="408" bgColor="#f3f3f3"><font
face="Verdana, Arial, Helvetica, sans-serif" size="2"><select id="Select1"
size="1" name="Onderwerp" runat="server">
<option>DGH cursus</option>
<option>Permanente Vorming</option>
<option>Brandweer</option>
<option>PIBA Algemene</option>
<option>Deze Website</option>
<option>Werknemer/lesgever</option>
<option selected>(Andere)</option>
</select></font> <asp:Label ID="lblAnderonderwerp" Runat="server"
Height=23>Ander onderwerp</asp:Label> <input id="Text1" maxLength="256"
size="15" name="AnderOnderwerp" runat="server"></FONT>
</td>
</tr>
<tr>
<td width="277" bgColor="#ffffff"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2">Typ
uw opmerkingen in het vak hieronder:</font></td>
<td width="408" bgColor="#f3f3f3"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2"><textarea id="TEXTAREA1" name="Opmerkingen" rows="5" cols="47" runat="server"></textarea>
</font>
</td>
</tr>
<tr>
<td width="277" bgColor="#ffffff"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2">Wenst
u opgenomen te worden in de mailinglist nieuwe Permanente
Vormingen?</font></td>
<td width="408" bgColor="#f3f3f3"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2"> <input type="radio" value="Ja"
name="Mailinglist">
Ja <input type="radio" CHECKED value="Nee" name="Mailinglist">
Nee </font>
</td>
</tr>
<tr>
<td width="277" bgColor="#ffffff"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2">Hoe
kunnen we contact met u opnemen?</font></td>
<td bgColor="#f3f3f3">
<table>

<tr>
<td><asp:label id="lblNaam" Font-Size="12px"
Font-Names="Verdana" Runat="server">Naam</asp:label></td>
<td><asp:textbox id="txtNaamGebruiker" Font-Size="12px"
Font-Names="Verdana" Runat="server" Width="245"></asp:textbox><font
color="#ff0000">*
</font><font face="Verdana, Arial, Helvetica, sans-serif"
size="2">Vereist </font>
<asp:requiredfieldvalidator id="chktxtNaam" Width=250
Runat="server" ControlToValidate="txtNaamGebruiker" Display="Dynamic"
ErrorMessage="The naam field should not be
empty"></asp:requiredfieldvalidator></td>
</tr>
<tr>
<td><asp:label id="lblEmail" Font-Size="12px"
Font-Names="Verdana" Runat="server">E-mail</asp:label></td>
<td><asp:textbox id="txtEmailGebruiker" Runat="server"
Font-Size="12px" Font-Names="Verdana" Width="245"></asp:textbox><font
color="#ff0000">*
</font><font face="Verdana, Arial, Helvetica, sans-serif"
size="2">Vereist </font>
<asp:requiredfieldvalidator Width=50 id="ChkEmail"
runat="server" ControlToValidate="txtEmailGebruiker" Display="Dynamic"
ErrorMessage="Please Enter Email"></asp:requiredfieldvalidator>
<asp:regularexpressionvalidator Width=154
id="Regularexpressionvalidator1" runat="server"
ControlToValidate="txtEmailGebruiker" ErrorMessage="InCorrect Email Address." display="dynamic"
ValidationExpression="^[\w\.\-_]+@([\w\.\-_]+\.)+[A-Za-z]{2,4}$"></asp:regul
arexpressionvalidator></td> </tr>
<tr>
<td><asp:label id="lblTelephone" Font-Size="12px"
Font-Names="Verdana" Runat="server">Telefoon</asp:label></td>
<td><asp:textbox id="txtTelGebruiker" Font-Size="12px"
Font-Names="Verdana" Runat="server" Width="245"></asp:textbox></td>
</tr>
<tr>
<td><font face="Verdana, Arial, Helvetica, sans-serif"
size="2">Fax </font>
<td><asp:textbox id="txtFaxGebruiker" Font-Size="12px"
Font-Names="Verdana" Runat="server" Width="245"></asp:textbox>
</td>
</tr>

</table>
</td>
</tr>
<tr>
<td width="277" bgColor="#ffffff"> </td>
<td width="408" bgColor="#f3f3f3"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2"><input id="ChkContactGewenst" type="checkbox" value="ContactGewenst" name="ContactGewenst" runat="server">
Neem hierover zo snel mogelijk contact met mij op. </font>
</td>
</tr>
<!--<tr>
<td width="277" bgColor="#ffffff"> </td>
<td width="408" bgColor="#f3f3f3"><font face="Verdana, Arial,
Helvetica, sans-serif" size="2"><input id="Radio1" type="radio"
value="Ambulancier" name="Mailinglist" runat="server">
Ambulancier <input id="Radio2" type="radio" value="Medisch"
name="Mailinglist" runat="server">
</font><font face="Verdana, Arial, Helvetica, sans-serif"
size="2">Medisch <input id="Mailinglist" type="radio" value="Brandweer"
name="Mailinglist" runat="server">
Brandweer</font></td>
</tr>-->
<tr>
<td width="277" bgColor="#ffffff"> </td>
<td align="middle" width="408" bgColor="#f3f3f3"><font
face="Verdana, Arial, Helvetica, sans-serif" size="2"><input id="Submit1"
style="WIDTH: 185px; HEIGHT: 24px" type="submit" value="Opmerkingen
verzenden" name="submit" runat="server">
<input id="Reset1" style="WIDTH: 185px; HEIGHT: 24px" type="reset"
value=" Formulier wissen " name="reset" runat="server">
</font>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
</form>
</body>
</HTML>
Thanks in advance

Venki

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.