Bug in input fields

Hello. The question is: why when you click on one of the forms, it is not clicked, but flips to the top one?

<form action="file2.php" method="post" name="form1">
  :
  <br />
  <label>
  <input type="text" name="name" id="name" />
  <br />
  :
  <br />
  <input type="text" name="lastname" id="lastname" />
  <br />
  :
  <br />
  <input type="text" name="otchestvo" id="otchestvo" />
  <br />
  :
  <br />
  <select name="country" id="country">
  <option></option>
  <option></option>
  <option></option>
  <option></option>
  <option></option>
  <option></option>
  </select>
  </label>
</form>

alt text


Answer 1, authority 100%

I think the problem is with the <label></label>tags. Try this:

<form action="file2.php" method="post" name="form1"> 
<label>: 
<input type="text" name="name" id="name"/></label>
<label>: 
<input type="text" name="lastname" id="lastname"/></label> 
<label>: 
<input type="text" name="otchestvo" id="otchestvo"/></label> 
<label>: 
<select name="country" id="country"> 
<option></option> 
<option></option> 
<option></option>
<option></option>
<option></option>
<option></option>
</select> </label> </form>

Although it is this code fragment of yours that works for me… Look, perhaps the error is not in it. Maybe somewhere a java function, or something …


Answer 2

Somewhere in the code there is a check for the contents of the top field. Look at the onclick and onfocus attributes of the text fields. Plus, check out the javascript that fires these events on text fields.

Updated
Answered too hastily. Read @Dariq’s answer (remove the label). =)