How to exchange data between forms in one document with pure HTML?

Discussion in 'HTML' started by Markus Stein, Jan 6, 2008.

  1. Markus Stein

    Markus Stein Guest

    Is there a possibility to exchange data between
    forms in one html document with pure html (no PHP,
    no server variables etc.)?

    Example:

    <html>
    <head>
    </head>
    <body>

    <!-- formular1: -->
    <form>
    <input type="text" name="inputformular1"/>
    <input type="submit" name="sendformular1"/>
    </form>

    <!-- formular2: -->
    <form>
    <input type="text" name="inputformular2"/>
    <input type="submit" name="sendformular2"/>
    </form>

    </body>
    </html>

    I want that if I click on the sendformular1 button
    the text in field inputformular1 appears in inputformular2
    and vice versa.

    Is it possible with pure html?
    Markus Stein, Jan 6, 2008
    #1
    1. Advertising

  2. Re: How to exchange data between forms in one document with pureHTML?

    Markus Stein wrote:
    > Is there a possibility to exchange data between
    > forms in one html document with pure html (no PHP,
    > no server variables etc.)?
    >
    > Example:
    >
    > <html>
    > <head>
    > </head>
    > <body>
    >
    > <!-- formular1: -->
    > <form>
    > <input type="text" name="inputformular1"/>
    > <input type="submit" name="sendformular1"/>
    > </form>
    >
    > <!-- formular2: -->
    > <form>
    > <input type="text" name="inputformular2"/>
    > <input type="submit" name="sendformular2"/>
    > </form>
    >
    > </body>
    > </html>
    >
    > I want that if I click on the sendformular1 button
    > the text in field inputformular1 appears in inputformular2
    > and vice versa.
    >
    > Is it possible with pure html?


    No.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Jan 6, 2008
    #2
    1. Advertising

  3. Markus Stein

    Neredbojias Guest

    Well bust mah britches and call me cheeky, on Sun, 06 Jan 2008 20:28:44 GMT
    Markus Stein scribed:

    > Is there a possibility to exchange data between
    > forms in one html document with pure html (no PHP,
    > no server variables etc.)?
    >
    > Example:
    >
    > <html>
    > <head>
    > </head>
    > <body>
    >
    > <!-- formular1: -->
    > <form>
    > <input type="text" name="inputformular1"/>
    > <input type="submit" name="sendformular1"/>
    > </form>
    >
    > <!-- formular2: -->
    > <form>
    > <input type="text" name="inputformular2"/>
    > <input type="submit" name="sendformular2"/>
    > </form>
    >
    > </body>
    > </html>
    >
    > I want that if I click on the sendformular1 button
    > the text in field inputformular1 appears in inputformular2
    > and vice versa.
    >
    > Is it possible with pure html?


    No, but you could do something with javascript. Btw, forms need an
    "action" attribute.

    --
    Neredbojias
    Riches are their own reward.
    Neredbojias, Jan 6, 2008
    #3
  4. Markus Stein

    Jeff Guest

    Re: How to exchange data between forms in one document with pureHTML?

    Neredbojias wrote:
    > Well bust mah britches and call me cheeky, on Sun, 06 Jan 2008 20:28:44 GMT
    > Markus Stein scribed:
    >
    >> Is there a possibility to exchange data between
    >> forms in one html document with pure html (no PHP,
    >> no server variables etc.)?
    >>
    >> Example:
    >>
    >> <html>
    >> <head>
    >> </head>
    >> <body>
    >>
    >> <!-- formular1: -->
    >> <form>
    >> <input type="text" name="inputformular1"/>
    >> <input type="submit" name="sendformular1"/>
    >> </form>
    >>
    >> <!-- formular2: -->
    >> <form>
    >> <input type="text" name="inputformular2"/>
    >> <input type="submit" name="sendformular2"/>
    >> </form>
    >>
    >> </body>
    >> </html>
    >>
    >> I want that if I click on the sendformular1 button
    >> the text in field inputformular1 appears in inputformular2
    >> and vice versa.
    >>
    >> Is it possible with pure html?

    >
    > No, but you could do something with javascript. Btw, forms need an
    > "action" attribute.


    I believe that if you leave out action, most browsers will point back
    at the page URL. Not good practice though...and that certainly wouldn't
    help if it wasn't what you wanted!

    Jeff
    >
    Jeff, Jan 7, 2008
    #4
  5. Markus Stein

    Bergamot Guest

    Re: How to exchange data between forms in one document with pureHTML?

    Jeff wrote:
    > Neredbojias wrote:
    >>
    >> Btw, forms need an
    >> "action" attribute.

    >
    > I believe that if you leave out action, most browsers will point back
    > at the page URL.


    The action attribute was optional in HTML 3.2, but has been required on
    the form element in all versions since then.

    --
    Berg
    Bergamot, Jan 7, 2008
    #5
  6. Re: How to exchange data between forms in one document with pureHTML?

    Jeff wrote:
    > Neredbojias wrote:
    >> Well bust mah britches and call me cheeky, on Sun, 06 Jan 2008
    >> 20:28:44 GMT Markus Stein scribed:
    >>
    >>> Is there a possibility to exchange data between
    >>> forms in one html document with pure html (no PHP,
    >>> no server variables etc.)?
    >>>
    >>> Example:
    >>>
    >>> <html>
    >>> <head>
    >>> </head>
    >>> <body>
    >>>
    >>> <!-- formular1: -->
    >>> <form>
    >>> <input type="text" name="inputformular1"/>
    >>> <input type="submit" name="sendformular1"/>
    >>> </form>
    >>>
    >>> <!-- formular2: -->
    >>> <form>
    >>> <input type="text" name="inputformular2"/>
    >>> <input type="submit" name="sendformular2"/>
    >>> </form>
    >>>
    >>> </body>
    >>> </html>
    >>>
    >>> I want that if I click on the sendformular1 button
    >>> the text in field inputformular1 appears in inputformular2
    >>> and vice versa.
    >>>
    >>> Is it possible with pure html?

    >>
    >> No, but you could do something with javascript. Btw, forms need an
    >> "action" attribute.

    >
    > I believe that if you leave out action, most browsers will point back
    > at the page URL. Not good practice though...and that certainly wouldn't
    > help if it wasn't what you wanted!


    It will not do what OP wishes and that is transfer and process data. You
    need scripting for that. HTML is not a scripting language, it doesn't
    "do" anything.


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Jan 7, 2008
    #6
  7. Markus Stein

    Jeff Guest

    Re: How to exchange data between forms in one document with pureHTML?

    Jonathan N. Little wrote:
    > Jeff wrote:
    >> Neredbojias wrote:
    >>> Well bust mah britches and call me cheeky, on Sun, 06 Jan 2008
    >>> 20:28:44 GMT Markus Stein scribed:
    >>>
    >>>> Is there a possibility to exchange data between
    >>>> forms in one html document with pure html (no PHP,
    >>>> no server variables etc.)?
    >>>>
    >>>> Example:
    >>>>
    >>>> <html>
    >>>> <head>
    >>>> </head>
    >>>> <body>
    >>>>
    >>>> <!-- formular1: -->
    >>>> <form>
    >>>> <input type="text" name="inputformular1"/>
    >>>> <input type="submit" name="sendformular1"/>
    >>>> </form>
    >>>>
    >>>> <!-- formular2: -->
    >>>> <form>
    >>>> <input type="text" name="inputformular2"/>
    >>>> <input type="submit" name="sendformular2"/>
    >>>> </form>
    >>>>
    >>>> </body>
    >>>> </html>
    >>>>
    >>>> I want that if I click on the sendformular1 button
    >>>> the text in field inputformular1 appears in inputformular2
    >>>> and vice versa.
    >>>>
    >>>> Is it possible with pure html?
    >>>
    >>> No, but you could do something with javascript. Btw, forms need an
    >>> "action" attribute.

    >>
    >> I believe that if you leave out action, most browsers will point
    >> back at the page URL. Not good practice though...and that certainly
    >> wouldn't help if it wasn't what you wanted!

    >
    > It will not do what OP wishes and that is transfer and process data. You
    > need scripting for that. HTML is not a scripting language, it doesn't
    > "do" anything.
    >
    >

    Lets say for an example that the form is on a server page and if it
    receives either post or get data it will do something with it. If not it
    will display the form. That is not an unusual setup.

    Note Bergamots post on action being optional in 3.2. Certainly
    without a doctype it wouldn't be html 4.

    It's all a minor point and I hope I won't regret bringing it up!

    Jeff
    Jeff, Jan 7, 2008
    #7
    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. CV
    Replies:
    1
    Views:
    516
    Natty Gur
    Dec 19, 2003
  2. www.westerncartooncards.ca

    Exchange Links < Western Cartoon Cards > Exchange Links

    www.westerncartooncards.ca, Jul 12, 2004, in forum: HTML
    Replies:
    2
    Views:
    1,219
    Toby Inkster
    Jul 12, 2004
  3. Todd Aspeotis
    Replies:
    3
    Views:
    451
    Kanenas
    May 30, 2005
  4. Replies:
    4
    Views:
    774
    Ben C
    Mar 29, 2008
  5. Alessandro Barracco

    matrix: exchange rows + exchange columns

    Alessandro Barracco, Jan 25, 2011, in forum: Ruby
    Replies:
    0
    Views:
    150
    Alessandro Barracco
    Jan 25, 2011
Loading...

Share This Page