You are here: Re: Forms and submit buttons « HTML « IT news, forums, messages
Re: Forms and submit buttons

Posted by JDS on 04/17/06 22:15

On Mon, 17 Apr 2006 12:03:47 -0700, debbie.games wrote:

> If I was writing my own server script to accept the data from my page,
> then wouldn't I just be able to take a default route for the submit key
> in my example code (i.e. no data), and only action the reset button as
> necessary if it were present?
>
> I know I'd be able to do this in C++ easily. It puzzles me that the two
> ways you reference are cited as the only way of doing it. There may be
> other reasons I'm not aware of, I guess?
>


Huh? Do what in C++? How would you do it?

In answer to the first paragraph I quoted from your post: NO. There is no
"default action".

If you do not give the submit button a name, then the server won't see it
and thus won't be able to do anything with it.

Check out this example:
http://engineering.jhu.edu/~jeff/default-submit-button.php

Note how when you click "Submit Me", a value shows up for the submit
button, but clicking on the other submit button, "This button has no name
attribute", there is no value for ANY submit button.

Also, note how the checkboxes only supply data to the server IF THEY ARE
CHECKED! If not checked, then NOTHING goes to the server. Not a value of
"not checked" -- nothing. The server has no idea that the checkboxes were
even on the form at all!!

And lastly, note that this behavior as described with the checkboxes does
not apply to the TEXT boxes because when a blank text box is submitted,
the server always sees it as an empty text box. A form field that is not
filled in. Not the same as with check boxes (or radio buttons or several
other HTML Form components)

Still stuck? ask more...


later...

--
JDS | jeffrey@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация