By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,730 Members | 1,567 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,730 IT Pros & Developers. It's quick & easy.

Form Method?

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.