Validation Questions

Discussion in 'HTML' started by gonebye, Jan 29, 2005.

  1. gonebye

    gonebye Guest

    Cheers,
    The w3c validator is giving me errors with
    http://wholives.com/index.htm regarding required
    attributes with <form, stating that <form> requires the "action" attribute.
    Well, pull down menus don't always have the "action=" attribute. None of
    the generators I've seen have "action=" either. Any suggestions?

    It's also telling me to get rid of valign. any suggestions?

    Thanks,
    me
    gonebye, Jan 29, 2005
    #1
    1. Advertising

  2. gonebye

    Karl Core Guest

    "gonebye" <> wrote in message
    news:...
    > Cheers,
    > The w3c validator is giving me errors with
    > http://wholives.com/index.htm regarding required
    > attributes with <form, stating that <form> requires the "action"
    > attribute.
    > Well, pull down menus don't always have the "action=" attribute. None of
    > the generators I've seen have "action=" either. Any suggestions?


    Add an action to it

    >
    > It's also telling me to get rid of valign. any suggestions?
    >


    Get rid of it


    --
    -Karl Core
    Please Support "Project Boneyard":
    http://www.insurgence.net/info.aspx?action=band&item=boneyard
    Karl Core, Jan 29, 2005
    #2
    1. Advertising

  3. gonebye wrote:

    > The w3c validator is giving me errors with
    > http://wholives.com/index.htm regarding required
    > attributes with <form, stating that <form> requires the "action"
    > attribute.


    This is true.

    > Well, pull down menus don't always have the "action=" attribute.


    No, <select> elements don't. <forms> do. If the select element isn't going
    to be submitted to the server, then why is it in a <form> in the first
    place?

    Removing the form isn't a good solution though, it sounds like you are
    trying to implement what Dreamweaver[1] calls a "Jump Menu". You really
    should have a server side fallback for those, in which case you need a
    <form>, and it needs to have an action attribute.

    Have a read of http://www.cs.tut.fi/~jkorpela/forms/navmenu.html - its a
    good document on the subject.

    > None of the generators I've seen have "action=" either.


    Generators?

    > It's also telling me to get rid of valign. any suggestions?


    Use CSS.

    [1] IIRC
    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Jan 29, 2005
    #3
  4. gonebye

    Steve Pugh Guest

    "gonebye" <> wrote:

    > The w3c validator is giving me errors with
    >http://wholives.com/index.htm regarding required
    >attributes with <form, stating that <form> requires the "action" attribute.


    Yes it's required, otherwise the form has nowhere to submit to and
    hence can't possibly work.

    I select and option from one of your pulldowns and click submit and it
    doesn't seem to be doing anything with the option I selected. Oh I see
    you have nine forms but only one submit button. So the first eight
    forms with their dropdown menus are useless.

    (Hint - JavaScript is optional, you can not rely on it being enabled
    in the user's browser.)

    >Well, pull down menus don't always have the "action=" attribute.


    If they're a form they should. But using a form for navigation rather
    than for user input is a bad idea.

    > None of
    >the generators I've seen have "action=" either. Any suggestions?


    Ditch the generators that are generating broken code.

    > It's also telling me to get rid of valign. any suggestions?


    Not on that page it isn't. Where is it telling you this? valign is a
    perfectly valid attribute for a number of elements. So either you're
    using it on an element that doesn't support it or you've misread the
    error message.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Jan 29, 2005
    #4
  5. gonebye

    gonebye Guest

    > > The w3c validator is giving me errors with
    > >http://wholives.com/index.htm regarding required
    > >attributes with <form, stating that <form> requires the "action"

    attribute.
    >
    > Yes it's required, otherwise the form has nowhere to submit to and
    > hence can't possibly work.


    They do all work when links are put in them. I dug around on google, and
    found pulldown forms with action="". This solves the problem, but I don't
    know if it's correct. I also found a usenet post where the webmaster didn't
    know what "action" to use, so he just used action="HELP!!!"

    The valign was not correctly positioned, changed it to vertical-align and
    put it behind style= , and now everything validates....

    homey
    gonebye, Jan 29, 2005
    #5
  6. gonebye

    Steve Pugh Guest

    "gonebye" <> wrote:
    >> > The w3c validator is giving me errors with
    >> >http://wholives.com/index.htm regarding required
    >> >attributes with <form, stating that <form> requires the "action"

    >attribute.
    >>
    >> Yes it's required, otherwise the form has nowhere to submit to and
    >> hence can't possibly work.

    >
    > They do all work when links are put in them.


    How? Where is the script on your server that receives the input and
    redirects the browser to the relevant URL?

    And how does the user even submit the form with no submit button?

    Did you understand what I said about JavaScript?

    > I dug around on google, and
    >found pulldown forms with action="". This solves the problem, but I don't
    >know if it's correct.


    That will submit the form to the same URL as that which contains the
    URL. Unless that URL is in fact a script running on the server that
    either serves out the page with the form or performs a redirect then
    the form will still not work.

    >I also found a usenet post where the webmaster didn't
    >know what "action" to use, so he just used action="HELP!!!"


    There could be a resource on his server called HELP!!! which accepts
    the submission of the form but I doubt it. ;-)

    > The valign was not correctly positioned, changed it to vertical-align and
    >put it behind style= , and now everything validates....


    Great, all you have to do now is make it work.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Jan 29, 2005
    #6
  7. gonebye wrote:
    > They do all work when links are put in them. I dug around on google, and
    > found pulldown forms with action="". This solves the problem, but I don't
    > know if it's correct. I also found a usenet post where the webmaster didn't
    > know what "action" to use, so he just used action="HELP!!!"
    > The valign was not correctly positioned, changed it to vertical-align and
    > put it behind style= , and now everything validates....


    Interesting. You are so concerned about validation, yet don't show a
    similar concern about usability. That just sounds like a train wreck
    coming kinda combination to me.

    --
    -=tn=-
    Travis Newbury, Jan 29, 2005
    #7
  8. Steve Pugh wrote:

    >> I dug around on google, and
    >>found pulldown forms with action="". This solves the problem, but I don't
    >>know if it's correct.


    > That will submit the form to the same URL as that which contains the
    > URL.


    It might - I don't believe the specification allows for a null value for the
    action attribute. Different browsers error correct in different ways. IIRC
    lynx treats it as action="./".

    A proper URL should be specified for all action attributes.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Jan 29, 2005
    #8
  9. gonebye

    Steve Pugh Guest

    David Dorward <> wrote:
    >Steve Pugh wrote:
    >
    >>> I dug around on google, and
    >>>found pulldown forms with action="". This solves the problem, but I don't
    >>>know if it's correct.

    >
    >> That will submit the form to the same URL as that which contains the
    >> URL.

    >
    >It might - I don't believe the specification allows for a null value for the
    >action attribute. Different browsers error correct in different ways. IIRC
    >lynx treats it as action="./".


    Treating an empty URL as ./ would be more compliant with RFC 1630 _if_
    (and it's a big 'if' which has caused long debates here before,
    debates which I didn't really follow and have no desire to see start
    up again) an empty string can be classed as a URL at all. If it can't
    then the HTML spec says regarding the action attribute "User agent
    behavior for a value other than an HTTP URI is undefined."

    >A proper URL should be specified for all action attributes.


    Absolutely.

    My earlier post was merely descriptive of what often happens and was
    not intended to be a recommendation in any way.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Jan 29, 2005
    #9
  10. gonebye

    gonebye Guest

    > That just sounds like a train wreck
    > coming kinda combination to me.
    > -=tn=-



    I don't know. What would you recomment? I was just looking at what
    others did. It does work. Does Validate and does Operate. Here's the code:

    <form name="form2" action="">
    <select class="pullmenus" name="menu2" size="1"
    onchange="location=document.form2.menu2.options[document.form2.menu2.selecte
    dIndex].value;">
    <option value="">Pull-Down Menu #2 (targets=_top)</option>
    <option value=http://yahoo.com>go to yahoo.com</option>
    </select>
    </form>
    gonebye, Jan 29, 2005
    #10
  11. gonebye

    gonebye Guest


    > And how does the user even submit the form with no submit button?


    No submit button, it's onchange (onclicks). Try it for yourself. I'm still
    mystified by action=??????????


    <form name="form2" action="">
    <select class="pullmenus" name="menu2" size="1"
    onchange="location=document.form2.menu2.options[document.form2.menu2.selecte
    dIndex].value;">
    <option value="">Pull-Down Menu #2 (targets=_top)</option>
    <option value=http://yahoo.com>go to yahoo.com</option>
    </select>
    </form>
    gonebye, Jan 29, 2005
    #11
  12. gonebye wrote:

    > I don't know. What would you recomment? I was just looking at what
    > others did. It does work. Does Validate and does Operate.


    And the moment JS is turned off, it stops operating. See the article by
    Jukka I referenced previously.
    http://www.cs.tut.fi/~jkorpela/forms/navmenu.html


    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Jan 29, 2005
    #12
  13. gonebye

    gonebye Guest

    Correction: Forgot the quotation marks on URL


    <form name="form2" action="">
    <select class="pullmenus" name="menu2" size="1"
    onchange="location=document.form2.menu2.options[document.form2.menu2.selecte
    dIndex].value;">
    <option value="">Pull-Down Menu #2 (targets=_top)</option>
    <option value="http://yahoo.com">go to yahoo.com</option>
    </select>
    </form>
    gonebye, Jan 29, 2005
    #13
  14. gonebye

    Steve Pugh Guest

    "gonebye" <> wrote:

    ><form name="form2" action="">
    ><select class="pullmenus" name="menu2" size="1"
    >onchange="location=document.form2.menu2.options[document.form2.menu2.selecte
    >dIndex].value;">
    ><option value="">Pull-Down Menu #2 (targets=_top)</option>
    ><option value="http://yahoo.com">go to yahoo.com</option>
    ></select>
    ></form>


    If a user has JavaScript turned off then they will effectively get
    this:

    <form name="form2" action="">
    <select class="pullmenus" name="menu2" size="1">
    <option value="">Pull-Down Menu #2 (targets=_top)</option>
    <option value="http://yahoo.com">go to yahoo.com</option>
    </select>
    </form>

    Which does nothing at all.

    If you don't care about the 15% or so of visitors who have JavaScript
    turned off then just say so and we can stop watsing our time trying to
    help you and start ignoring you instead.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Jan 29, 2005
    #14
  15. gonebye

    gonebye Guest

    gonebye, Jan 29, 2005
    #15
  16. While the city slept, gonebye () feverishly typed...

    >> Jukka I referenced previously.
    >> http://www.cs.tut.fi/~jkorpela/forms/navmenu.html


    > 60 links along the left column is plain ugly.


    Then fix your navigation. You don't need 60 links in a menu.

    Incidentally, my mouse has a wheel which allows me to scroll down the page,
    or to scroll through drop-down lists if they have focus. Thanks to your
    onchange event handler scary things happen if I should happen to select one
    of the options, then go back to your page and use the wheel to scroll down
    the page, forgetting that the list has focus!

    Cheers,
    Nige

    --
    Nigel Moss
    http://www.nigenet.org.uk
    Mail address not valid. , take the DOG. out!
    In the land of the blind, the one-eyed man is very, very busy!
    nice.guy.nige, Jan 29, 2005
    #16
  17. gonebye wrote:
    > 60 links along the left column is plain ugly.


    Links are *way* more useful. I'd say one of the best reasons is that
    Google can read a list of links, but it can't follow a dropdown JS list.
    Also, one can use and navigate a list of links much easier than a drop
    down menu.

    Do you have too many links in one place? Your site already seems to be
    sectioned off. Offer links to the main section pages, then further links
    from there. Also, make a site map if you're going to have more than 60
    documents.

    http://www.cs.tut.fi/~jkorpela/forms/navmenu.html#ben
    --
    Michael Wilcox
    Michael Wilcox, Jan 29, 2005
    #17
  18. gonebye wrote:
    >>That just sounds like a train wreck
    >>coming kinda combination to me.

    > I don't know. What would you recomment? I was just looking at what
    > others did. It does work. Does Validate and does Operate. Here's the code:


    It doesn't work when you have javascript off. If that is acceptable to
    you then go for it.

    --
    -=tn=-
    Travis Newbury, Jan 29, 2005
    #18
  19. gonebye

    Richard Guest

    On Sat, 29 Jan 2005 04:44:51 -0600 gonebye wrote:

    > Cheers,
    > The w3c validator is giving me errors with
    > http://wholives.com/index.htm regarding required
    > attributes with <form, stating that <form> requires the "action"
    > attribute.
    > Well, pull down menus don't always have the "action=" attribute. None
    > of
    > the generators I've seen have "action=" either. Any suggestions?


    > It's also telling me to get rid of valign. any suggestions?


    > Thanks,
    > me




    www.4thorder.us

    Check out the menu offered.
    You can define any number of levels you want with practically anything in
    them.
    Your use of all those drop down boxes is insane.
    Richard, Jan 29, 2005
    #19
  20. gonebye wrote:

    >> Jukka I referenced previously.
    >> http://www.cs.tut.fi/~jkorpela/forms/navmenu.html


    > 60 links along the left column is plain ugly.


    60 links on a single page is generally too much - real links or psudolinks
    implemented with a select. I suggest logically grouping them and having
    fewer links to a number of index pages.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Jan 29, 2005
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Colin Mackay
    Replies:
    0
    Views:
    2,684
    Colin Mackay
    Jun 25, 2003
  2. Libs
    Replies:
    0
    Views:
    1,490
  3. Colin Basterfield

    Web form validation vs object validation

    Colin Basterfield, Nov 28, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    425
    Tommy
    Nov 29, 2003
  4. Matt
    Replies:
    14
    Views:
    4,093
    Chad Z. Hower aka Kudzu
    Jan 30, 2004
  5. Lucas Tam
    Replies:
    2
    Views:
    1,105
    Lucas Tam
    Feb 26, 2004
Loading...

Share This Page