Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 25th, 2006, 10:14 PM
Registered User
 
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Form doesn't w3c validate, html 4.01

Hi.
I'm having trouble validating one of the forms on our website. Other forms validate, but this one doesn't want to work. The form is designed to have 3 drop down selectors and a go button. They are meant to display in one row, with about 8 cells (3 drop downs, 1 go button, 3 spacers).

It currently displays correctly, but doesn't validate. The validator complains that:
1. document type does not allow element "FORM" here.
and
2. document type does not allow element "TR" here.

Whenever I try and rearrange the tags, the display gets horribly messed up. It displays correctly now, but doesn't validate.

The code looks like this:

<body>
<table>
<tr><td>bunch of stuff</td></tr>

<form action="search.php" method="get" name="SearchPullDown">
<tr>
<td width="192" height="36" colspan="5"> <img src="images/image1.gif" alt="" ></td>
<td width="158" height="36" colspan="9" class="tableclass1">
<select name="selectname1" class="selectclass" id="id1" style="width:146px; height:20px;">
<option value="Option1" >Option 1</option>
</select></td>
<td width="30" height="36"> <img src="images/abc.gif" alt="" ></td>
<td width="154" height="36" colspan="5" class="tableclass2">
<select name="selectname2" class="selectclass" id="id2" style="width:146px; height:20px;">
<option value="Option2" >Option 2</option>
</select></td>
<td width="23" height="36" colspan="4"> <img src="images/lmn.gif" alt="" ></td>
<td width="157" height="36" colspan="5" class="tableclass3">
<select name="selectname3" class="selectclass" id="id3" style="width:146px; height:20px;">
<option value="Option3">Option3</option>
</select></td>
<td width="61" height="36" colspan="3">
<input type="image" src="images/zyx.gif" alt="Find"></td>
</tr>
</form>

</table>
</body>

Any help much appreciated. Thanks in advance.

 
Old November 26th, 2006, 03:41 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Quote:
quote:</tr>
<form action="search.php" method="get" name="SearchPullDown">
<tr>
You can't have _anything_ between table rows. Not between table cells either. All text and elements other than those the table itself consists of must be contained in table cells.

--
http://yupapa.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter 3 validate form. lucian BOOK: Professional Ajax ISBN: 978-0-471-77778-6 0 October 16th, 2006 05:17 AM
W3C Validation of FORM steamydave CSS Cascading Style Sheets 2 April 27th, 2005 10:39 AM
Validate form dreamdragon Pro JSP 0 December 11th, 2004 08:11 AM
Validate calculated field in sub form MG76 Access 4 March 18th, 2004 04:26 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.