/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] xhtml strict and forms, validation problem

Hi,

I initially built a page in xhtml transitional and now I am trying to make the switch to xhtml strict. The entire site is valid except for a form that controls a search bar that I’m required to include on the site.

The site is here:

[url]http://www.indiana.edu/~meis/comments_strict.shtml[/url] (just a test page)

And the code for the search bar in question is here:

[CODE]
<div id=”search”>
<form method=”get” action=”http://search5.iu.edu/search”>
<input type=”text” name=”q” size=”25″ maxlength=”255″ value=”Search www.iub.edu”/>
<input type=”submit” name=”btnG” value=”Search”/>
<input type=”hidden” name=”site” value=”iub”/>
<input type=”hidden” name=”client” value=”iub”/>
<input type=”hidden” name=”proxystylesheet” value=”iub”/>
<input type=”hidden” name=”output” value=”xml_no_dtd”/>
</form>
</div>[/CODE]

What am I doing wrong? How can I get the above to be valid? The error message I get from w3 (for all six lines beginning with “<input…”) is:

[QUOTE]

document type does not allow element “input” here; missing one of “p”, “h1”, “h2”, “h3”, “h4”, “h5”, “h6”, “div”, “pre”, “address”, “fieldset”, “ins”, “del” start-tag.

[/QUOTE]

I’m really confused because the form that I have below the search bar is validating, but the search bar is not.

Any help appreciated, and any other criticisms/feedback of the site in general are also appreciated.

Thanks!

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@FangOct 13.2008 — Form controls must be wrapped in a block element:&lt;div id="search"&gt;
&lt;form method="get" action="http://search5.iu.edu/search"&gt;
[COLOR="Blue"]&lt;div&gt;[/COLOR]
&lt;input type="text" name="q" size="25" maxlength="255" value="Search www.iub.edu"/&gt;
&lt;input type="submit" name="btnG" value="Search"/&gt;
&lt;input type="hidden" name="site" value="iub"/&gt;
&lt;input type="hidden" name="client" value="iub"/&gt;
&lt;input type="hidden" name="proxystylesheet" value="iub"/&gt;
&lt;input type="hidden" name="output" value="xml_no_dtd"/&gt;
[COLOR="Blue"]&lt;/div&gt;[/COLOR]
&lt;/form&gt;
&lt;/div&gt;
Copy linkTweet thisAlerts:
@boycottIEauthorOct 13.2008 — Thanks a ton!

I saw your reply to my other thread in the CSS forum... thank you for that as well!
×

Success!

Help @boycottIE spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...