no new page when submitting form

Discussion in 'HTML' started by Armin, Jul 29, 2004.

  1. Armin

    Armin Guest

    Hi!

    does anyone know how to submit a form without reloading the page the form
    was sent from?

    is there something like <form target="_none"> that calls the action (somehow
    in the "background") of the form but does not open a new window and leaves
    the current one unchanged?

    Thanks!
     
    Armin, Jul 29, 2004
    #1
    1. Advertising

  2. *Armin* wrote:
    > does anyone know how to submit a form without reloading the page the
    > form was sent from?
    >
    > is there something like <form target="_none"> that calls the action
    > (somehow in the "background") of the form but does not open a new
    > window and leaves the current one unchanged?


    Instruct the server to return a HTTP 204 upon receipt of the submission.
    Alternatively use client-side scripting and an XMLHTTP-like interface or
    hack the Image() object to pass data via a querystring. The 204 is the
    preferred option since client-side script may or may not be
    enabled/supported. All methods probably suck for usability.
    --
    Andrew Urquhart
    - FAQ: www.html-faq.com
    - Archive: www.google.com/groups?q=alt.html
    - Contact me: http://andrewu.co.uk/contact/
    - Apologies for the wrong timestamp on my post - blame my ISP
     
    Andrew Urquhart, Jul 29, 2004
    #2
    1. Advertising

  3. "Armin" <> wrote:

    > does anyone know how to submit a form without reloading the page the
    > form was sent from?


    As Andrew Urquhart replied, sending back the 204 No Content response at
    the HTTP level is the right approach. But...

    > is there something like <form target="_none"> that calls the action
    > (somehow in the "background") of the form but does not open a new
    > window and leaves the current one unchanged?


    .... please note that target="_none" violates HTML specifications, which
    even say that browsers should ignore such attribute settings. There is a
    small, predefined set of target names beginning with "_", such as
    "_blank", and "_none" is not among them.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Jul 29, 2004
    #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.
Similar Threads
  1. Display Name
    Replies:
    1
    Views:
    434
    Hywel Jenkins
    Oct 20, 2003
  2. Dave Smithz
    Replies:
    3
    Views:
    34,796
    mokker
    Oct 30, 2009
  3. Marco Alting
    Replies:
    7
    Views:
    554
    Thomas 'PointedEars' Lahn
    Oct 30, 2003
  4. Kai Grossjohann
    Replies:
    4
    Views:
    294
  5. Matthew Lybanon
    Replies:
    1
    Views:
    119
    Hywel
    Jun 2, 2004
Loading...

Share This Page