Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 2 of 2

Thread: Markup Validation

  1. #1
    yellowz06 is offline Junior Member
    Join Date
    Oct 2009
    Posts
    3

    Default Markup Validation

    Hi,
    I'm getting the following error when doing an html markup validation. It seems to be from the search box built into v9. I can't figure out how to fix it. Any advise?

    thanks



    1. Error Line 183, Column 108: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag

    … <span id="ctl00_Search1" class="search"><div id="ctl00_Search1_SearchPanel">



    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. #2
    travisalmand is offline Junior Member
    Join Date
    Mar 2010
    Posts
    24

    Default

    Unfortunately you'll have to edit the control that generates the search field so that it generates valid HTML.

    I've looked into doing this myself because on our site the problem lies in the fact that for some reason ADNSF wants to wrap a div (block element) with a span (inline element) for the search field, which is not valid. This is the error you are seeing, basic HTML dictates that you cannot have a block element inside of a span element.

    The reason I never edited it is because I quickly found out that there are validation errors throughout the entire site which would involve us rewriting almost all code that generates HTML. I decided it wasn't worth it in the long run and decided to live with a site that doesn't validate.

    Although, everything does work.