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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Dec 2007
    Location
    on earth
    Posts
    183
    Thanks
    49
    Thanked 2 Times in 2 Posts

    Jump Menu Works but Does not Validate

    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
    Last edited by mikacruz; 10-17-2008 at 01:14 PM.

  • #2
    Regular Coder Aradon's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    734
    Thanks
    0
    Thanked 20 Times in 19 Posts
    Java != javascript or html validation
    "To iterate is human, to recurse divine." -L. Peter Deutsch

  • #3
    Senior Coder
    Join Date
    Oct 2008
    Location
    Long Beach
    Posts
    1,196
    Thanks
    36
    Thanked 164 Times in 164 Posts
    This isn't a javascript issue, it's a doctype issue. Iirc a change to transitional will fix those errors.

    Or you can place all your selects in empty divs.

    The principle behind the exceptions: every inline element (ie all actual content) needs to be inside a block element for strict DOM.

    All the tags w3 validator is listing are block elements you can use to wrap your selects.

    Also, make sure there is a space between your last attribute and the "/>" - this is for legacy browsers.
    Last edited by itsallkizza; 10-17-2008 at 07:57 PM. Reason: addition

  • Users who have thanked itsallkizza for this post:

    mikacruz (10-20-2008)

  • #4
    Regular Coder
    Join Date
    Dec 2007
    Location
    on earth
    Posts
    183
    Thanks
    49
    Thanked 2 Times in 2 Posts
    Thank you,
    Sorry for putting thread in wrong topic ;-)


  •  

    Posting Permissions

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