[UPHPU] Posting a form
Jason Jones
j at poeticintensity.com
Thu Feb 24 10:25:03 MST 2005
Mac Newbold wrote:
> Today at 9:47am, Wade Preston Shearer said:
>
>>> The 'submit' $_POST entry will only be set if the button named
>>> 'submit' is actually clicked.
>>
>>
>> Really? That is strange. I wonder how I have not experienced this
>> before.
>
>
> I'm with Wade on this one.... I would expect that I would have been
> bitten by this by now.
>
> I know that when you have _multiple_ submit buttons in a form, that it
> only sends the one that was actually clicked, but with a _single_
> submit button, maybe it does send it anyway?
>
> I wonder what the browser does in a multiple-submit button page if you
> hit enter...
>
> I also wonder what it does in terms of javascript... if you have a
> single submit button form, and hit enter, it knows you mean that
> submit button, but would it run the onclicks or not? In other words,
> how directly is the enter key translated to a mouse click on the
> submit button?
>
> Anyone want to do some testing?
>
> Mac
>
> --
> Mac Newbold MNE - Mac Newbold Enterprises, LLC
> mac at macnewbold.com http://www.macnewbold.com/
I'm on the same page. I've built many forms using PHP to process the
information, and I press enter all the time to test the submission of my
stuff. I use Firefox / Mozilla. Who knows what IE does.
One thing I have noticed is that when ever I press enter, the cursor is
in the text field / on the radio button or checkbox that is on the form
being submitted. I doubt that just pressing enter with the cursor
somewhere else would submit the form, but relying on the hundreds of
times I've pressed enter to submit a form, I'm pretty sure it works, at
least with Mozilla.
--Jason
More information about the UPHPU
mailing list