Modify POST variables before to send

T

Tom Lobato

Hi all,

Is there a way for delete variables of a form just before it is
sended to server?
I don't want to delete the input element, but only to prevent that
name/value to be sended to the server.


Thank you,
Tom Lobato
 
R

Randy Webb

Tom Lobato said the following on 6/10/2007 8:20 PM:
Hi all,

Is there a way for delete variables of a form just before it is
sended to server?
I don't want to delete the input element, but only to prevent that
name/value to be sended to the server.

Set it's value to "". A better alternative is to have the server ignore
the inputs. But, if you want the inputs ignored, why are they on the
page to start with?
 
T

Tom Lobato

Tom Lobato said the following on 6/10/2007 8:20 PM:



Set it's value to "". A better alternative is to have the server ignore
the inputs. But, if you want the inputs ignored, why are they on the
page to start with?

Hi Randy, thank you for quick reply.

This html sends the post request to a server that I cannot program:
absolutefp script, that reads name/values's and creates a ms xls
document.

On client side, I need to have fields "phone_prefix" and
"phone_number" on html form, but only send to final xls spreadsheet
one field: "phone", that is a concatenation of both.




Tom Lobato
 
R

Randy Webb

Tom Lobato said the following on 6/10/2007 8:49 PM:
Hi Randy, thank you for quick reply.

This html sends the post request to a server that I cannot program:
absolutefp script, that reads name/values's and creates a ms xls
document.

On client side, I need to have fields "phone_prefix" and
"phone_number" on html form, but only send to final xls spreadsheet
one field: "phone", that is a concatenation of both.

Then have a hidden input named "phone" and update it whenever
phone_number and phone_prefix get modified. And then, put them in a
separate form so they don't get submitted.
 
T

Tom Lobato

Tom Lobato said the following on 6/10/2007 8:49 PM:







Then have a hidden input named "phone" and update it whenever
phone_number and phone_prefix get modified. And then, put them in a
separate form so they don't get submitted.

Indeed, I tried to set to "" but it yet is send to server.

Before I had thought in such solution (another form), but was
searching something like
post_request.remove(var1). Now I see that indeed making another form's
is not a bad way (and maybe it is the only :).

Thank you very much for the great help!



Tom Lobato
 
T

Tom Lobato

Is there some special way to use nested form's? I tried to put
phone_number and phone_prefixa inside form "form_dummy", and this
inside
"form1", but the elements inside form_dummy are being send to server
when
I submit form1.


Tom Lobato
 
R

Randy Webb

Tom Lobato said the following on 6/11/2007 12:37 AM:
Is there some special way to use nested form's?

You don't, as that creates invalid HTML.
I tried to put phone_number and phone_prefixa inside form
"form_dummy", and this inside "form1", but the elements
inside form_dummy are being send to server when I submit form1.

That is why you can't nest them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top