Form Method?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dennis Marks

    Form Method?

    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.javas cript 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

    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! =-----
  • Martin Johansen

    #2
    Re: Form Method?

    Dennis Marks wrote:[color=blue]
    > 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.[/color]

    Forms fields serve as input for the program after the action="program "
    in the <form> tag
    [color=blue]
    > 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?[/color]

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

    Get sends the input via the url like this

    Google Images. The most comprehensive image search on the web.


    And post send the input as a data stream to the program.
    [color=blue]
    > I responded in comp.lang.javas cript to "Adding to fields with
    > onchange". I had to leave "method=" out to get it to work without
    > trying to reload the page.
    >[/color]

    Comment

    Working...