Zidalgo Wordpress Forums | Validation errors in search form

You must be logged in to post Login Register

Search Forums:


 






Validation errors in search form

UserPost

12:25 am
May 25, 2010


Hanah

Member

posts 7

1

I'm making changes in the theme files. I'm getting some errors when I try to validate. For instance, this

  1. Error Line 159, Column 196: 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

    …his.value = '';}" onblur="if (this.value == '') {this.value = 'Search...';}" />

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

  2. Error Line 160, Column 60: 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" id="searchsubmit" value="Search" />

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

It seems to be from the searchform.php


Any help is appreciated.

5:34 pm
May 25, 2010


admin

Admin

posts 173

2

Hi Hanah,

Which files are you changing, how and why you're changing them, and what you're using to validate them?


11:23 pm
May 26, 2010


Hanah

Member

posts 7

3

I had a lot of validation errors and want to change the layout for SEO: specifically to take the post titles on the single post pages out of the sidebar, where search engines can't find them. I had introduced a lot of errors when I set up my site so I started with fresh files on my test site and am making changes gradually, but I am still getting error messages,  that seem to be related to the core files.

I used the W3C validation service. http://validator.w3.org/

I didn't change the coding on the searchform.php, which seems to be the problem.


7:03 pm
June 1, 2010


admin

Admin

posts 173

4

Well, you'll need to find and correct the errors, they're usually not so called errors, by example if you have an image without "alt" property, it'll say it's an error.