submit form to same page

Discussion in 'HTML' started by Shank, Dec 24, 2005.

  1. Shank

    Shank Guest

    I'm having a problem with submitting a form to the same page. 99% of all
    users go through without issue. Yet there's a handful that say their data is
    not being submitted. They redirect to an error page.

    Assume I'm submitting to the same page: review.asp
    Is there any difference between: action="review.asp" and action="" ...?

    <form action="review.asp" method="post" name="frmReview" id="frmReview">

    thanks
     
    Shank, Dec 24, 2005
    #1
    1. Advertising

  2. Shank wrote:

    > Is there any difference between: action="review.asp" and action="" ...?


    The former submits to the relative URL "review.asp", the latter isn't a URL
    and the behaviour is undefined, some browsers will treat it as if it was
    the URL of the current page, others will treat it as "./", its best
    avoided.

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

  3. On 24/12/2005 21:01, David Dorward wrote:

    > Shank wrote:
    >
    >> Is there any difference between: action="review.asp" and action=""
    >> ...?

    >
    > The former submits to the relative URL "review.asp", the latter isn't
    > a URL and the behaviour is undefined [...]


    Not so.

    Within a representation with a well defined base URI of

    http://a/b/c/d;p?q

    a relative reference is transformed to its target URI as
    follows.

    ...

    "" = "http://a/b/c/d;p?q"

    -- 5.4 and 5.4.1, Reference Resolution Examples, RFC 3986

    However, I do agree that it's best avoided in production as not all user
    agents agree. For example, and as David said, IE will treat empty URIs
    in links as "./", though it will act properly for FORM action attributes
    with empty values.

    Mike

    --
    Michael Winter
    Prefix subject with [News] before replying by e-mail.
     
    Michael Winter, Dec 24, 2005
    #3
    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.

Share This Page