php-general Digest 12 Aug 2011 07:48:06 -0000 Issue 7441
Topics (messages 314505 through 314511):
Re: form handling
314505 by: Jim Giner
314506 by: Chris Stinemetz
314507 by: Jim Giner
314508 by: Chris Stinemetz
314509 by: Bastien
314510 by: Chris Stinemetz
314511 by: Ashley Sheridan
Administrivia:
To subscribe to the digest, e-mail:
[email protected]
To unsubscribe from the digest, e-mail:
[email protected]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
I'm thinking that Chris means that he has a 'page' designed that utilizes
two form tags for functionally different sets of input fields. The answer
Chris is that a page can have many forms and whether or not they trigger the
same script upon submit or not doesn't matter. Go ahead!
My sample html:
blah
blah
head
script
/script
style
/style
/head
body
form
inputs
/form
blah
blah
form
inputs
/form
/body
/html
If the two forms call the same script that's fine. If not, that will work
too. Just realize that the inputs from one form will NOT be returned to the
script when the submit is used from the other form.
--- End Message ---
--- Begin Message ---
>
> If the two forms call the same script that's fine. If not, that will work
> too. Just realize that the inputs from one form will NOT be returned to the
> script when the submit is used from the other form.
>
Jim,
This is what I am trying to do. One submit button for both forms going
to the same destination.
The only reason I am doing this is because I can't figure out why my
ajax for my select menus is altering my tinyMCE textarea box.
Ultimately if I can figure out how to control the ajax within the div
container as I showed in a previous email I would be able to just use
one form. any ideas??
Thanks,
Chris
--- End Message ---
--- Begin Message ---
Jim,
This is what I am trying to do. One submit button for both forms going
to the same destination.
The only reason I am doing this is because I can't figure out why my
ajax for my select menus is altering my tinyMCE textarea box.
Ultimately if I can figure out how to control the ajax within the div
container as I showed in a previous email I would be able to just use
one form. any ideas??
Thanks,
Chris
****
Chris,
By definition, a 'submit' button submits a form. Not 2 forms. Each form
has to have it's own form. It is not feasible to submit two forms - since
the conversation from your client pc is going to be garbled even if you
could (JS?) do the second submit. One transactiion is going to answer your
client and then the other is going to wipe it out with its respone.
I don't think you have ot separate your forms becuase they are in separate
divs. I could be wrong - never tried it.
--- End Message ---
--- Begin Message ---
> Chris,
> By definition, a 'submit' button submits a form. Not 2 forms. Each form
> has to have it's own form. It is not feasible to submit two forms - since
> the conversation from your client pc is going to be garbled even if you
> could (JS?) do the second submit. One transactiion is going to answer your
> client and then the other is going to wipe it out with its respone.
>
> I don't think you have ot separate your forms becuase they are in separate
> divs. I could be wrong - never tried it.
>
>
I didn't think it was possible either. I will play around with the div
container and ajax some more tonight. Hope I will be able to figure it
out. Is it possible to place a div within the form to only affect the
select tags?
Thanks,
Chris
--- End Message ---
--- Begin Message ---
On 2011-08-11, at 9:13 PM, "Jim Giner" <[email protected]> wrote:
> Jim,
>
> This is what I am trying to do. One submit button for both forms going
> to the same destination.
>
> The only reason I am doing this is because I can't figure out why my
> ajax for my select menus is altering my tinyMCE textarea box.
>
> Ultimately if I can figure out how to control the ajax within the div
> container as I showed in a previous email I would be able to just use
> one form. any ideas??
>
> Thanks,
>
> Chris
>
> ****
> Chris,
> By definition, a 'submit' button submits a form. Not 2 forms. Each form has
> to have it's own form. It is not feasible to submit two forms - since the
> conversation from your client pc is going to be garbled even if you could
> (JS?) do the second submit. One transactiion is going to answer your client
> and then the other is going to wipe it out with its respone.
>
> I don't think you have ot separate your forms becuase they are in separate
> divs. I could be wrong - never tried it.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
I would bet it's the quotes screwing up the js. Can / are you escaping that
variable when ajaxing it back?
Bastien Koert
905-904-0334
--- End Message ---
--- Begin Message ---
>
> I would bet it's the quotes screwing up the js. Can / are you escaping that
> variable when ajaxing it back?
>
> Bastien Koert
> 905-904-0334
>
I found a way to make the ajax work with one form. I removed the table
and the ajax worked just fine. Aparently you can't embed div
containers within a table without affecting the whole table. At least
that is what I found out tonight. Please correct me if I am wrong.
Chris
--- End Message ---
--- Begin Message ---
Chris Stinemetz <[email protected]> wrote:
>>
>> I would bet it's the quotes screwing up the js. Can / are you
>escaping that variable when ajaxing it back?
>>
>> Bastien Koert
>> 905-904-0334
>>
>
>I found a way to make the ajax work with one form. I removed the table
>and the ajax worked just fine. Aparently you can't embed div
>containers within a table without affecting the whole table. At least
>that is what I found out tonight. Please correct me if I am wrong.
>
>Chris
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
Without seeing your code, its hard to figure out what is happening. Post it
onto pastebin or something (large code excerpts are very hard to read on this
mailing list). Often, running the code through validator.w3.org will find
issues that are affecting your layout.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
--- End Message ---