Click to See Complete Forum and Search --> : Validation Again.


Zach Elfers
03-10-2003, 03:15 PM
Ok. More validation problems but this time I hardly have any and they should be easy to figure out. The site: http://members.lycos.co.uk/syst3m1337/index.php

The validator has a problem with the input elements in the login form. It says that the element isn't allowed where it is.


...
<form action="login.php" method="post">
<input type="hidden" name="site" value="private/index.php" />
Username:<input class="loginTxt" type="text" name="username" />
<br />
Password:<input class="loginTxt" type="password" name="password" />
<br />
<input class="loginButton" type="submit" value="Login" name="submit" />
<p>
&nbsp;
</p>
</form>
...

khalidali63
03-10-2003, 04:14 PM
Did not ge that error on both IE6+ and NS6+

:-)

Khalid

boojum
03-10-2003, 04:20 PM
i was getting an error about needing ins, div, etc first or something. i solved it by stick everything in the form in a div first (but not the form opening and closing tags). if this is your problem, it might next say something about the form tag, if that happens wrap it in a div too (so two useless divs, and i dont know why. validator gets what validator wants)

Zach Elfers
03-11-2003, 06:13 AM
I added a <fieldset> tag and everything is fine now. I will try the divs. Khalidali, what do you mean by you didn't get any errors? You mean not through the validator?

nkaisare
03-11-2003, 02:01 PM
The form elements should be within block level elements such as h#, p, div, table, td etc.

<form...>
<input...>
...
is NOT OK.

Instead, use
<form...>
<div><input...>
...
</div>
</form>