From: The Natural Philosopher on
JR wrote:
> On Dec 23, 11:39 am, JR <groups_j...(a)yahoo.com.br> wrote:
>> On Dec 23, 7:51 am, The Natural Philosopher <t...(a)invalid.invalid>
>> wrote:
>>
>>
>>
>>
>>
>>> Thomas 'PointedEars' Lahn wrote:
>>>> Doug Miller wrote:
>>>>> The Natural Philosopher wrote:
>>>>>> I think I dint make myself clear. With js I can fire an evfent handler.,
>>>>>> set any amount of post variables, and do a submit. I can even submit to
>>>>>> a totally different target or spawn a popup window.
>>>>>> With strict HTML one button=one vale,
>>>>> No. The array of POST variables sent to the server includes all named
>>>>> input elements in the form, regardless of how many submit buttons there
>>>>> are.
>>>> There is no "array of POST variables".
>>> Muy Bad, that's how they appear in PHP, of course, but you are perfectly
>>> right.
>>> The message body of an HTTP POST
>>>> request is a string, with a HTML form it is usually
>>>> name1=value1&name2=value2
>>>> etc., with names and values URL-encoded. It is only the server-side
>>>> application, e.g. PHP, that makes an (associative) array (e.g.,
>>>> $HTTP_POST_VARS or $_POST) out of it.
>>> Correct, as always, Thomas. ;-)
>> Correct but irrelevant, since anyway you would need a server-side
>> script (PHP, ASP, etc.) to retrieve the data submitted by the client.
>
> Of course I'm considering that you've told us, from the beginning,
> that you are "designing the public facing part of a sales website".
> Therefore, you will need a server-side language and a server database
> to accomplish that.
>

ER, he's not the OP: I am, and that's all in place already. Mysql/PHP


> Cheers,
> JR
From: The Natural Philosopher on
Doug Miller wrote:
> In article <hgsolg$qs5$1(a)news.albasani.net>, The Natural Philosopher <tnp(a)invalid.invalid> wrote:
>> Doug Miller wrote:
>>> In article <hgreb8$r8d$1(a)news.albasani.net>, The Natural Philosopher
>> <tnp(a)invalid.invalid> wrote:
>>>> Doug Miller wrote:
>>>> I think I dint make myself clear. With js I can fire an evfent handler.,
>>>> set any amount of post variables, and do a submit. I can even submit to
>>>> a totally different target or spawn a popup window.
>>>>
>>>> With strict HTML one button=one vale,
>>> No. The array of POST variables sent to the server includes all named input
>>> elements in the form, regardless of how many submit buttons there are.
>>>
>> You still misunderstand, the action of pressing the button can only, by
>> itself, _change_ ONE of them.
>
> What?
>
> You have multiple <input> elements in a form, and multiple submit buttons.
> Click *any* of the submit buttons, and the values of *all* of the <input>
> elements are transmitted to the server.

Yes, but they are not changed *by the action of clicking on the button*.

>> Whereas an event handler can set up as many from that one button press
>> as you care to code for.
>
> You don't need an event handler to transmit values from a form to a server.
>>
>>>> and unless I use two forms, one
>>>> target URL and no spaewning of windows.
>>>>
>>>> With a straight URL I can spawn a window, but how to pass variables to
>>>> it? Except with 'get'
>>>> Cookies?
>>> Use POST to pass the values to a server-side script which then generates the
>>> code to spawn the new window. This is trivially easy with PHP.
>> ? eh? I dont see that. How can I get two windows where only one was
>> before! the broswer itself is the only entity that can spawn a new windows.
>
> Sorry, omitted one thing: target="_blank" attribute in the link.
From: The Natural Philosopher on
Doug Miller wrote:
> In article <hgsolg$qs5$1(a)news.albasani.net>, The Natural Philosopher <tnp(a)invalid.invalid> wrote:
>> Doug Miller wrote:
>>> In article <hgreb8$r8d$1(a)news.albasani.net>, The Natural Philosopher
>> <tnp(a)invalid.invalid> wrote:
>>>> Doug Miller wrote:
>>>> I think I dint make myself clear. With js I can fire an evfent handler.,
>>>> set any amount of post variables, and do a submit. I can even submit to
>>>> a totally different target or spawn a popup window.
>>>>
>>>> With strict HTML one button=one vale,
>>> No. The array of POST variables sent to the server includes all named input
>>> elements in the form, regardless of how many submit buttons there are.
>>>
>> You still misunderstand, the action of pressing the button can only, by
>> itself, _change_ ONE of them.
>
> What?
>
> You have multiple <input> elements in a form, and multiple submit buttons.
> Click *any* of the submit buttons, and the values of *all* of the <input>
> elements are transmitted to the server.

Is English your second language?

CHANGE one of them. Not SEND one of them.

>> Whereas an event handler can set up as many from that one button press
>> as you care to code for.
>
> You don't need an event handler to transmit values from a form to a server.
>>
>>>> and unless I use two forms, one
>>>> target URL and no spaewning of windows.
>>>>
>>>> With a straight URL I can spawn a window, but how to pass variables to
>>>> it? Except with 'get'
>>>> Cookies?
>>> Use POST to pass the values to a server-side script which then generates the
>>> code to spawn the new window. This is trivially easy with PHP.
>> ? eh? I dont see that. How can I get two windows where only one was
>> before! the broswer itself is the only entity that can spawn a new windows.
>
> Sorry, omitted one thing: target="_blank" attribute in the link.
From: Doug Miller on
In article <hgu6mg$8mp$1(a)news.albasani.net>, The Natural Philosopher <tnp(a)invalid.invalid> wrote:
>Doug Miller wrote:
>> In article <hgsolg$qs5$1(a)news.albasani.net>, The Natural Philosopher
> <tnp(a)invalid.invalid> wrote:
>>> Doug Miller wrote:
>>>> In article <hgreb8$r8d$1(a)news.albasani.net>, The Natural Philosopher
>>> <tnp(a)invalid.invalid> wrote:
>>>>> Doug Miller wrote:
>>>>> I think I dint make myself clear. With js I can fire an evfent handler.,
>>>>> set any amount of post variables, and do a submit. I can even submit to
>>>>> a totally different target or spawn a popup window.
>>>>>
>>>>> With strict HTML one button=one vale,
>>>> No. The array of POST variables sent to the server includes all named input
>
>>>> elements in the form, regardless of how many submit buttons there are.
>>>>
>>> You still misunderstand, the action of pressing the button can only, by
>>> itself, _change_ ONE of them.
>>
>> What?
>>
>> You have multiple <input> elements in a form, and multiple submit buttons.
>> Click *any* of the submit buttons, and the values of *all* of the <input>
>> elements are transmitted to the server.
>
>Is English your second language?
>
>CHANGE one of them. Not SEND one of them.

SEND is the normal action when clicking the submit button. Why do you want to
CHANGE *any* of them by clicking the *submit* button?

It seems you are a little confused about how forms operate.
From: Thomas 'PointedEars' Lahn on
Doug Miller wrote:

> Thomas 'PointedEars' Lahn wrote:
>> Doug Miller wrote:
>>> Thomas 'PointedEars' Lahn wrote:
>>>> Doug Miller wrote:
>>>>> The Natural Philosopher wrote:
>>>>>> I think I dint make myself clear. With js I can fire an evfent
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>>> handler., set any amount of post variables, and do a submit. I can
>>>>>> even
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>>> submit to a totally different target or spawn a popup window.
>>>>>>
>>>>>> With strict HTML one button=one vale,
>>>>> No. The array of POST variables sent to the server includes all named
>>>>> input elements in the form, regardless of how many submit buttons
>>>>> there are.
>>>> There is no "array of POST variables".
>>> From the perspective of a server-side script, there certainly is (e.g.
>>> $_POST in PHP).
>>
>>The perspective was not any server-side application here.
>
> Actually, yes it was, since the OP was asking how to accomplish a task
> *without* using javascript, and my discussion with him described in a
> general way how to manage it using server-side scripting.

You are wrong, read again. (I had already marked the important part, how
could you miss it twice?)

>>>> The message body of an HTTP POST
>>>> request is a string, with a HTML form it is usually
>>>>
>>>> name1=value1&name2=value2
>>>>
>>>> etc., with names and values URL-encoded. It is only the server-side
>>>> application, e.g. PHP, that makes an (associative) array (e.g.,
>>>> $HTTP_POST_VARS or $_POST) out of it.
>>> I'm afraid you've missed the point altogether, which is that I was
>>> correcting the previous poster's misapprehension that only one value
>>> could be transmitted per submit button.
>> No, I did notice that. Your answer was partially wrong anyway (as the
>> question was completely wrong).
>
> Wrong in what way, pray tell?

"The array of POST variables sent to the server ..."


PointedEars
--
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
-- Richard Cornford, cljs, <cife6q$253$1$8300dec7(a)news.demon.co.uk> (2004)