Form Method?

Discussion in 'HTML' started by Dennis Marks, May 22, 2004.

  1. Dennis Marks

    Dennis Marks Guest

    I only use forms as input and output to javascripts. Many times I use
    innerhtml to write to a <div> for output. I don't know of an
    alternative for input.

    I sometimes have problems if I use method="post" and just leave it off.
    The browser tried to reload the page after the script ran. Sometimes I
    am able to even leave off <form> and </form>. Could someone explain
    when form and method are actually needed?

    I responded in comp.lang.javascript to "Adding to fields with
    onchange". I had to leave "method=" out to get it to work without
    trying to reload the page.

    --
    Dennis Marks
    http://www.dcs-chico.com/~denmarks/
    To reply change none to dcsi.


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
     
    Dennis Marks, May 22, 2004
    #1
    1. Advertising

  2. Dennis Marks wrote:
    > I only use forms as input and output to javascripts. Many times I use
    > innerhtml to write to a <div> for output. I don't know of an
    > alternative for input.


    Forms fields serve as input for the program after the action="program"
    in the <form> tag

    > I sometimes have problems if I use method="post" and just leave it off.
    > The browser tried to reload the page after the script ran. Sometimes I
    > am able to even leave off <form> and </form>. Could someone explain
    > when form and method are actually needed?


    The input is sent as either method="post" or method="get"

    Get sends the input via the url like this

    http://www.google.com/imghp?hl=en&tab=wi&q=

    And post send the input as a data stream to the program.

    > I responded in comp.lang.javascript to "Adding to fields with
    > onchange". I had to leave "method=" out to get it to work without
    > trying to reload the page.
    >
     
    Martin Johansen, May 23, 2004
    #2
    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. jerry051
    Replies:
    2
    Views:
    752
    Oliver Sturm
    Aug 2, 2005
  2. Mike Wilmot
    Replies:
    0
    Views:
    3,288
    Mike Wilmot
    Dec 15, 2003
  3. Li Zhang
    Replies:
    4
    Views:
    6,081
    softip
    Feb 27, 2009
  4. Kyung won Cheon
    Replies:
    0
    Views:
    207
    Kyung won Cheon
    Nov 21, 2008
  5. rob c
    Replies:
    4
    Views:
    332
    McKirahan
    Dec 30, 2005
Loading...

Share This Page