1 (edited by eric235u 2007-07-22 05:09)

Topic: form in announcement

this question will surely show my incredible ignorance of xhtml.  if i stick this in the 'announcement' box i get validation errors.

<p><a href="http://thepiratebay.org/browse">Browse Torrents</a> | <a href="http://thepiratebay.org/recent">Recent Torrents</a> | <a href="http://thepiratebay.org/tv">TV shows</a> | <a href="http://thepiratebay.org/top">Top 100</a></p>
<form action="http://thepiratebay.org/s/" method="get">
<input type="hidden" name="page" value="0" />
<input type="hidden" name="orderby" value="3" />

<input type="text" name="q" /> <b>-</b> <input type="submit" value="Pirate Search"/>

</form>

and here's the errors.

# Error  Line 46 column 44: 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.

<input type="hidden" name="page" value="0" />

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

# Error Line 47 column 47: 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.

<input type="hidden" name="orderby" value="3" />

# Error Line 49 column 29: 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.

<input type="text" name="q" /> <b>-</b> <input type="submit" value="Pirate Searc

# Error Line 49 column 33: document type does not allow element "b" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.

<input type="text" name="q" />  <b>-</b> <input type="submit" value="Pirate Searc

# Error Line 49 column 83: 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.

... type="submit" value="Pirate Search"/>

any tips on how to fix that?  thanks.

Re: form in announcement

put the <p> just after <form> and </p> just before </form>

not sure but try it.

Re: form in announcement

Indeed, that should do the trick.

Re: form in announcement

that did it.  thanks guys!