Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Submit() only some variables in JS

Reply
Thread Tools

Submit() only some variables in JS

 
 
jcvel@canada.com
Guest
Posts: n/a
 
      02-15-2008
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
 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      02-15-2008
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?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      02-15-2008
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>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
Tim Slattery
Guest
Posts: n/a
 
      02-15-2008
"Evertjan." <(E-Mail Removed)> wrote:

>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;

--
Tim Slattery
MS MVP(Shell/User)
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://members.cox.net/slatteryt
 
Reply With Quote
 
jcvel@canada.com
Guest
Posts: n/a
 
      02-15-2008
On Feb 15, 8:42*am, Tim Slattery <(E-Mail Removed)> wrote:
> "Evertjan." <(E-Mail Removed)> wrote:
> >Come to think of it,
> >just do not give those <input>
> >a name and it won't be submitted,
> >nojsnecessary.

>
> 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;
>
> --
> Tim Slattery
> MS MVP(Shell/User)
> (E-Mail Removed)://members.cox.net/slatteryt


Thanks guy, all makes sense. I'll give atry and will reply my
findings.!!!
 
Reply With Quote
 
jcvel@canada.com
Guest
Posts: n/a
 
      02-15-2008
On Feb 15, 9:26*am, (E-Mail Removed) wrote:
> On Feb 15, 8:42*am, Tim Slattery <(E-Mail Removed)> wrote:
>
>
>
>
>
> > "Evertjan." <(E-Mail Removed)> wrote:
> > >Come to think of it,
> > >just do not give those <input>
> > >a name and it won't be submitted,
> > >nojsnecessary.

>
> > 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;

>
> > --
> > Tim Slattery
> > MS MVP(Shell/User)
> > (E-Mail Removed)://members.cox.net/slatteryt

>
> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nat port Forwarding , allows only only some ip rayuthar@gmail.com Cisco 0 04-17-2008 02:21 PM
Put variables into member variables or function variables? tjumail@gmail.com C++ 9 03-23-2008 04:03 PM
Any way to restrict class variables only to some methods? Shawn Java 3 10-28-2006 04:32 PM
Any way to restrict class variables only to some methods? Shawn Java 4 10-28-2006 12:36 PM
How can I restrict that the some ID can only login once in the some time ad ASP .Net 2 08-12-2005 09:14 PM



Advertisments