470,648 Members | 1,608 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,648 developers. It's quick & easy.

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.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! =-----
Jul 23 '05 #1
1 1171
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.

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Stuart Perryman | last post: by
3 posts views Thread by Chris | last post: by
15 posts views Thread by http://www.visual-basic-data-mining.net/forum | last post: by
10 posts views Thread by menashay | last post: by
1 post views Thread by Korara | last post: by
reply views Thread by warner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.