Submit() only some variables in JS

J

jcvel

Hi All:
1. Is there any way of submitting only several variables froma form in
JS ?
I have some constraints in the server side, so I would like to have a
button and when clicked, submit only certain variables.
2. Creating a new form changes my formatting. Is there a way of
creating a form and superimposing it on top of another ?

Yes I am new to JS. Thanks for your help

JC
 
E

Evertjan.

wrote on 15 feb 2008 in microsoft.public.inetserver.asp.general:
Hi All:
1. Is there any way of submitting only several variables froma form in
JS ?

You cannot submit a clientside variable, only it's content. [semantics]
I have some constraints in the server side, so I would like to have a
button and when clicked, submit only certain variables.
2. Creating a new form changes my formatting. Is there a way of
creating a form and superimposing it on top of another ?

Done by a "superimposter"??

You can make a second hidden form,
copy the data you want to submit into that,
and submit that form with javascript.

Yes I am new to JS. Thanks for your help

Probably first learn some js on simpler tasks?
 
E

Evertjan.

Evertjan. wrote on 15 feb 2008 in microsoft.public.inetserver.asp.general:
wrote on 15 feb 2008 in microsoft.public.inetserver.asp.general:
Hi All:
1. Is there any way of submitting only several variables froma form in
JS ?

You cannot submit a clientside variable, only it's content. [semantics]
I have some constraints in the server side, so I would like to have a
button and when clicked, submit only certain variables.
2. Creating a new form changes my formatting. Is there a way of
creating a form and superimposing it on top of another ?

Done by a "superimposter"??

You can make a second hidden form,
copy the data you want to submit into that,
and submit that form with javascript.

Come to think of it,
just do not give those <input>
a name and it won't be submitted,
no js necessary.

<form>
<input name='sendMe' value='myData'><br>
<input value='DataNoToBeSent'><br>
<input type='submit' value='a button'>
</form>
 
T

Tim Slattery

Evertjan. said:
Come to think of it,
just do not give those <input>
a name and it won't be submitted,
no js necessary.

Or set "disabled=true " for the ones you don't want to submit.
I'd add "id" attributes to Evertjan's form:

<form>
<input name='sendMe' value='myData' id="sendme"><br>
<input value='DataNoToBeSent' id="datano"><br>
<input type='submit' value='a button'>
</form>

Then if you want to submit only sendme, run this statement before
submitting:

document.getElementById("sendme").disabled = true;
 
J

jcvel

Or set "disabled=true " for the ones you don't want tosubmit.
I'd add "id" attributes to Evertjan's form:

<form>
<input name='sendMe' value='myData' id="sendme"><br>
<input value='DataNoToBeSent' id="datano"><br>
<input type='submit' value='a button'>
</form>

Then if you want tosubmitonlysendme, run this statement before
submitting:

document.getElementById("sendme").disabled = true;

Thanks guy, all makes sense. I'll give atry and will reply my
findings.!!!
 
J

jcvel

Thanks guy, all makes sense. I'll give  atry and will reply my
findings.!!!- Hide quoted text -

- Show quoted text -

I tried it and it worked by disabling the <input..>
Thanks yor your help
Juan
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top