PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

zoom form not valid html?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • zoom form not valid html?

    Hello, I really like the zoom search product.

    I'm trying to validate the HTML on my site, and am being told that the search form part is not valid. I am validating to strict HTML 4.0.1. Does anyone have any ideas as to why this might be?

    The validator is saying:

    ^^^

    document type does not allow element "INPUT" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag

    <input type="text" name="zoom_query" size="20">

    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 "

    " or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

    and

    end tag for "FORM" which is not finished

    </form>

    Most likely, You nested tags and closed them in the wrong order. For example

    [i]...</p> is not acceptable, as [i] must be closed before

    . Acceptable nesting is:

    ...</p>

    Another possibility is that you used an element (e.g. 'ul') which requires a child element (e.g. 'li') that you did not include. Hence the parent element is "not finished", not complete

    ^^^

    I've taken the form out of my divs and put it just in my "body" section, which I thought would work, but still the same errors. I haven't changed the code of the form at all.

    Any help would be much appreciated.

    Thanks, Katie

  • #2
    I assume you are using the search form HTML from this page:
    http://www.wrensoft.com/zoom/support...tml#searchform

    We just checked that it indeed does not validate for "HTML 4.0 Strict" as it is. It only requires a small change however, specifically that it needed a

    tag pair within the <form>. That is:

    Code:
    <form method="GET" action="search.php">
        
    
    
        <input type="text" name="zoom_query" size="20">
        <input type="submit" value="Search">
        [size="1"] Results per page&#58; 
        <select name='zoom_per_page'>
            <option selected>10</option>
            <option >20</option>
            <option >100</option>
        </select>
    
    Match&#58; 
        <input type="radio" name="zoom_and" value="0" checked>any search words 
        <input type="radio" name="zoom_and" value="1">all search words [/size] 
        </p>
    </form>
    We usually validate our HTML against Transitional doctypes, and since Version 4.0 the primary doctype we work towards is now "XHTML 1.0 Transitional".
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      Thanks for your help Ray, and yes that was where I took my form code from (I had forgotten where it came from).

      I knew you were aiming for XHTML from all the "/>"s I had to take out of search.php!

      Putting the

      and </p> tags in the form above means it does now validate to strict HTML.

      Thanks again for a brilliant free product.

      Katie

      Comment

      Working...
      X