form no action

Discussion in 'HTML' started by Leif K-Brooks, Jul 11, 2004.

  1. Jeff Thies wrote:
    > I have a form tag with no properties:
    > When I submit that form (it's a server page) it submits it to itself.
    >
    > Is this the default behaviour (submitting to the same url)


    It depends on what your browser chooses to do. Most browsers seem to
    submit to the current page.

    > and is that reliable?


    No. The standard (http://www.w3.org/TR/html4/interact/forms.html#h-17.3)
    doesn't say what should happen, and a perfectly compliant browser would
    probably raise an error if you do that. A browser could just as easily
    explode, display a photo of a cute little kitty, or submit the form to a
    page showing hardcore porno.
     
    Leif K-Brooks, Jul 11, 2004
    #1
    1. Advertising

  2. Leif K-Brooks

    Jeff Thies Guest

    I have a form tag with no properties:

    <form> look ma, no action

    When I submit that form (it's a server page) it submits it to itself.

    I wasn't really expecting that as I had just forgotten to add the action.

    Is this the default behaviour (submitting to the same url) and is that
    reliable?

    Jeff
     
    Jeff Thies, Jul 12, 2004
    #2
    1. Advertising

  3. Leif K-Brooks

    Mark Parnell Guest

    On Mon, 12 Jul 2004 05:27:20 GMT, Jeff Thies <>
    declared in alt.html:

    > I have a form tag with no properties:
    >
    > <form> look ma, no action


    That's malformed. Didn't the validator tell you that the action
    attribute is required?

    > Is this the default behaviour (submitting to the same url) and is that
    > reliable?


    Depends on the browser, and no.

    "action = uri [CT]
    This attribute specifies a form processing agent. User agent
    behavior for a value other than an HTTP URI is undefined."
    http://www.w3.org/TR/html4/interact/forms.html#h-17.3

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
     
    Mark Parnell, Jul 12, 2004
    #3
  4. Leif K-Brooks

    Art Sackett Guest

    Jeff Thies <> wrote:
    > I have a form tag with no properties:
    >
    > <form> look ma, no action
    >
    > When I submit that form (it's a server page) it submits it to itself.


    > Is this the default behaviour (submitting to the same url) and is that
    > reliable?


    It would be a client-defined behavior, as the various recommendations
    don't specify a default. I recommend against relying upon any default
    behavior that isn't in the recommendations, no matter how reliably it
    might seem to work.

    --
    Art Sackett
     
    Art Sackett, Jul 12, 2004
    #4
  5. Jeff Thies <> wrote:

    > <form> look ma, no action
    >
    > When I submit that form (it's a server page) it submits it to
    > itself.


    As others have responded, the construct is erroneous by current HTML
    specifications, and as far as specs go, anything may happen, since the
    specs don't impose any requirements on processing erroneous documents
    (and for this kind of error, no suggestion either).

    On the other hand, this is a change in HTML 4.0, since by HTML 3.2, the
    action attribute was optional, and HTML 2.0 (a great improvement over its
    successors in clarity) said the same and additionally: "The action URI of
    a form defaults to the base URI of the document." Not surprisingly, then,
    browsers tend to behave that way if the action attribute is omitted.

    (The base URI, in turn, defaults - in the absence of a <base href="...">
    tag - to the URI of the document itself. And "URI", in practical terms,
    is the geek way of spelling "URL".)

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Jul 12, 2004
    #5
  6. Leif K-Brooks

    brucie Guest

    in post: <news:>
    Leif K-Brooks <> said:

    > [submit with my form action]
    > A browser could just as easily explode, display a photo of a cute
    > little kitty, or submit the form to a page showing hardcore porno.


    i can confirm this with opera 7.52 (win) the cute little kitty
    bestiality site i glimpsed shortly before my browser exploded was very
    shocking.

    --
    b r u c i e
     
    brucie, Jul 12, 2004
    #6
  7. Leif K-Brooks

    Toby Inkster Guest

    brucie wrote:

    > i can confirm this with opera 7.52 (win) the cute little kitty
    > bestiality site i glimpsed shortly before my browser exploded was very
    > shocking.


    I didn't think anything shocked you, brucie?

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby Inkster, Jul 12, 2004
    #7
  8. Leif K-Brooks

    brucie Guest

    in post: <news:p>
    Toby Inkster <> said:

    > I didn't think anything shocked you, brucie?


    i'm always shocked to discover there are people just as sick 'n twisted
    as i am. they scare me.

    --
    b r u c i e
     
    brucie, Jul 12, 2004
    #8
  9. Leif K-Brooks

    SpaceGirl Guest

    brucie wrote:

    > in post: <news:>
    > Leif K-Brooks <> said:
    >
    >
    >>[submit with my form action]
    >>A browser could just as easily explode, display a photo of a cute
    >>little kitty, or submit the form to a page showing hardcore porno.

    >
    >
    > i can confirm this with opera 7.52 (win) the cute little kitty
    > bestiality site i glimpsed shortly before my browser exploded was very
    > shocking.
    >


    My... Hello Kitty is all grown up!

    --


    x theSpaceGirl (miranda)

    # lead designer @ http://www.dhnewmedia.com #
    # remove NO SPAM to email, or use form on website #
     
    SpaceGirl, Jul 12, 2004
    #9
  10. brucie wrote:
    > i can confirm this with opera 7.52 (win) the cute little kitty
    > bestiality site i glimpsed shortly before my browser exploded was very
    > shocking.


    Never drink cum and roke while reading Usenet.
     
    Leif K-Brooks, Jul 12, 2004
    #10
  11. Leif K-Brooks

    Jeff Thies Guest

    Leif K-Brooks wrote:
    > brucie wrote:
    >
    >> i can confirm this with opera 7.52 (win) the cute little kitty
    >> bestiality site i glimpsed shortly before my browser exploded was very
    >> shocking.

    >
    >
    > Never drink cum and roke while reading Usenet.


    I'll bet Brucie won't be able to lay off that line!

    Cheers,
    Jeff
     
    Jeff Thies, Jul 12, 2004
    #11
    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. Joe Bloggs
    Replies:
    1
    Views:
    893
    Sudsy
    Aug 3, 2003
  2. rjweytens
    Replies:
    6
    Views:
    16,197
    rjweytens
    Jun 25, 2004
  3. runescience

    Struts mapping action to action???

    runescience, Feb 6, 2006, in forum: Java
    Replies:
    3
    Views:
    1,898
    runescience
    Feb 7, 2006
  4. vyshu
    Replies:
    1
    Views:
    2,612
    Richard Senior
    Apr 27, 2007
  5. John
    Replies:
    0
    Views:
    960
Loading...

Share This Page