Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Dec 2007
    Location
    on earth
    Posts
    183
    Thanks
    49
    Thanked 2 Times in 2 Posts

    Jump Menu and Validator

    Hello fellows,
    I have checked a page that contains several jump menus, with validator.w3.org,
    The jump menus work fine but they show lots of errors for the validator.
    Here is the page in question

    Line 44, Column 24: document type does not allow element "select" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.
    Code:
    <select name="jump_menu">
    Line 50, Column 109: 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.
    Code:
    …ura.com/blank.gif" alt="jump button"/>
    If anyone knows whats wrong, please let me know
    Thanks a lot

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,864
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Yes, the inline elements like input ,select etc can't be the immediate child of a form element. You need to wrap them by a block level element.

    Adding a <fieldset> and a <legend> is the semantic way. However you may adjust with a single <div>, like

    Code:
    <form......>
    <div>
     <input .../>
     ......
    </div>
    </form>
    I'd recommend you to read http://www.alistapart.com/articles/p...ccessibleforms
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder
    Join Date
    Dec 2007
    Location
    on earth
    Posts
    183
    Thanks
    49
    Thanked 2 Times in 2 Posts
    Sweet link abdu, cheers!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •