This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > August 2004 > What am I doin wrong with this form?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author What am I doin wrong with this form?
forums.macromedia.com

2004-08-06, 12:15 pm

Hi there,

I have a form I am using in a strict doc type and am getting a couple of
validation errors:

This is the simple form:

<h5>Search</h5>
<form id="searchform" method="get" action="<?php echo $PHP_SELF; ?>">
<input type="text" name="s" id="s" size="15" />
<input type="submit" name="submit" value="<?php _e('Search'); ?>" />
</form>


a.. Line 175, 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="text" name="s" id="s" size="15" />

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>").



a.. Line 176, column 52: 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="submit" name="submit" value="Search" />

What might I be doing wrong?



Thanks


robot88888888

2004-08-06, 12:15 pm

Do you have a link?

"forums.macromedia.com" <michell@colby.net> wrote in message
news:cevvqs$bqc$1@forums.macromedia.com...
> Hi there,
>
> I have a form I am using in a strict doc type and am getting a couple of
> validation errors:
>
> This is the simple form:
>
> <h5>Search</h5>
> <form id="searchform" method="get" action="<?php echo $PHP_SELF; ?>">
> <input type="text" name="s" id="s" size="15" />
> <input type="submit" name="submit" value="<?php _e('Search'); ?>" />
> </form>
>
>
> a.. Line 175, 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="text" name="s" id="s" size="15" />
>
> 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>").
>
>
>
> a.. Line 176, column 52: 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="submit" name="submit" value="Search" />
>
> What might I be doing wrong?
>
>
>
> Thanks
>
>



Michael Fesser

2004-08-06, 7:14 pm

.oO(forums.macromedia.com)

>I have a form I am using in a strict doc type and am getting a couple of
>validation errors:
>
>This is the simple form:
>
> <h5>Search</h5>
> <form id="searchform" method="get" action="<?php echo $PHP_SELF; ?>">
> <input type="text" name="s" id="s" size="15" />
> <input type="submit" name="submit" value="<?php _e('Search'); ?>" />
> </form>
>
>
>a.. Line 175, 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
>[...]
>
>What might I be doing wrong?


Form controls are inline-level elements, but the form-element only
allows block-level content like p, div, table etc.

Possible solution:

<form id="searchform" method="get" action="<?php echo $PHP_SELF; ?>">
<p>
<input type="text" name="s" id="s" size="15" />
<input type="submit" name="submit" value="<?php _e('Search'); ?>" />
</p>
</form>

HTH
Micha
forums.macromedia.com

2004-08-06, 7:15 pm

Thanks Micha,

That is a gret help:)


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews