Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Form Method?

Reply
Thread Tools

Form Method?

 
 
Dennis Marks
Guest
Posts: n/a
 
      05-22-2004
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! =-----
 
Reply With Quote
 
 
 
 
Martin Johansen
Guest
Posts: n/a
 
      05-23-2004
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.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to retrieve form field value if form is EncType=multipart/form-dataForm? Li Zhang ASP .Net 4 02-27-2009 01:23 AM
<form>...</form> - how to supress blank space after </form> in IE? rob c Javascript 4 12-30-2005 06:10 PM
vs2005 - Open a child form based on selected record parent form's dgv - how? dbuchanan ASP .Net 2 12-19-2005 10:52 PM
Form in a form - possible ? Adam Benson ASP .Net 3 07-29-2003 09:19 AM
passing arguments from web-form to win-form Mart Rogers ASP .Net 3 07-09-2003 07:18 AM



Advertisments