468,746 Members | 1,878 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,746 developers. It's quick & easy.

Request object

I have passed a form with a post.
the form is generated from a dB and can change.
the page that accepts the post must get the input name and value from the form passed to it.

Request.Form(I)(1) give me the value, but I can not retrieve the name.

I know it is something simple. but cannot seem to get to work.

Jul 23 '05 #1
14 2137
here is the compete line
<input name="<%= trim(Request.Form(I)(1))%>" type="hidden" value="<%= trim(Request.Form(I)(2))%>">

"BJ Freeman" <bj***********@free-man.net> wrote in message news:Tz***************@news.uswest.net...
I have passed a form with a post.
the form is generated from a dB and can change.
the page that accepts the post must get the input name and value from the form passed to it.

Request.Form(I)(1) give me the value, but I can not retrieve the name.

I know it is something simple. but cannot seem to get to work.

Jul 23 '05 #2
On Tue, 6 Apr 2004 08:04:31 -0700, BJ Freeman wrote:
here is the compete line
<input name="<%= trim(Request.Form(I)(1))%>" type="hidden" value="<%= trim(Request.Form(I)(2))%>">


Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.

Anyway, Form is a Collection of Request Object, so you can use the Key for
obtain the name of a element.

For Example:

Request.Form.Key(1)

--
C'ya,
ZER0 :: coder.gfxer.webDesigner();

Non esistono donne brutte. Dipende solo da quanta vodka bevi.
(proverbio russo)
Jul 23 '05 #3
ZER0 wrote:
<snip>
Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.

<snip>

Rubbish, JScript is an ECMAScript implementation and so completely on
topic for this group.

Richard.
Jul 23 '05 #4
BJ Freeman wrote on 06 apr 2004 in comp.lang.javascript:
I have passed a form with a post.
the form is generated from a dB and can change.
the page that accepts the post must get the input name and value from
the form passed to it.

Request.Form(I)(1) give me the value, but I can not retrieve the name.

I know it is something simple. but cannot seem to get to work.


[please do not use html on usenet]

Serverside ASP scripting:

<%
result = request.form("inputname")
%>

If this is in serverside javascript, "request.form" is case sensitive

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 23 '05 #5
On Tue, 6 Apr 2004 16:43:06 +0100, Richard Cornford wrote:
<snip>
Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.

<snip>

Rubbish, JScript is an ECMAScript implementation and so completely on
topic for this group.


Sorry for my english, maybe is not so clear.
I mean: If you use ASP/VBS, you're Off Topic. Not with ASP/JScript.
And your code *seems* VBS (for trim() use). Of course, trim could be a
JScript custom function (but usually in JScript the way is add a trim()
method to String object), this is the reason 'cause I wrote "seems VBS",
and not "is VBS".

--
C'ya,
ZER0 :: coder.gfxer.webDesigner();

Una mente perversa e' un peccato sprecarla.
(A dirty mind is a terrible thing to waste)
Jul 23 '05 #6
ZER0 wrote:
Richard Cornford wrote:
<snip>
Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.
<snip>
Rubbish, JScript is an ECMAScript implementation and so completely on
topic for this group.


Sorry for my english, maybe is not so clear.

<snip> .. this is the reason 'cause I wrote
"seems VBS", and not "is VBS".


Fair enough, a misinterpretation on my part, sorry. I haven't been
reading the OP's actual posts because they are in - Content-Type:
multipart/alternative; - instead of plain text (as is required).

Richard.
Jul 23 '05 #7
Richard Cornford wrote:
ZER0 wrote:
<snip>
Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.


<snip>

Rubbish, JScript is an ECMAScript implementation and so completely on
topic for this group.

Richard.


No, I think ZERO is right. This is VBS code, not JScript code. In ASP,
as far as I know, the following code is ASP:

<% =Split("THIS IS A TEST")(0) %>

where the following is JScript:

<% ="THIS IS A TEST".split(" ")[0] %>

The OP was using both the VBScript form of Split, and the VBScript form
of array indexing. Unless I am missing your point, I believe this is OT.

Brian

Jul 23 '05 #8
"Richard Cornford" <Ri*****@litotes.demon.co.uk> wrote:
ZER0 wrote:
<snip>
Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.

<snip>

Rubbish, JScript is an ECMAScript implementation and so completely on
topic for this group.


Yup, JScript is exactly that. But the text that OP submitted was
written in VBScript, not JScript, hence ZERO's comment.

--
Tim Slattery
Sl********@bls.gov
Jul 23 '05 #9
my apologies for the non plain text. did not notice.
First this is java script.
trim is my function I use.
the request object, in javascript does nto support what I wanted to do.

so I improvice and parse the Request.Form() thru splits,

<%
var fromvars =new String(Request.Form());
var i=5;

var options = fromvars.split( "&" )
%>
<%for (var loop=i; loop < options.length; loop++)
{%>
<%var optionsparts =options[loop].split('=');%>
<input name="<%= trim(optionsparts [0])%>" type="hidden" value="<%=
trim(optionsparts [1])%>">
<%}%>
"BJ Freeman" <bj***********@free-man.net> wrote in message
news:wG****************@news.uswest.net...
here is the compete line
<input name="<%= trim(Request.Form(I)(1))%>" type="hidden" value="<%=
trim(Request.Form(I)(2))%>">
"BJ Freeman" <bj***********@free-man.net> wrote in message
news:Tz***************@news.uswest.net...
I have passed a form with a post.
the form is generated from a dB and can change.
the page that accepts the post must get the input name and value from the
form passed to it.

Request.Form(I)(1) give me the value, but I can not retrieve the name.
I know it is something simple. but cannot seem to get to work.
Jul 23 '05 #10
Not sure how you evaluated that line of code to be VBA. It is JavaScript.
"ZER0" <ze********@libero.it> wrote in message
news:ba**************@ID-171124.news.individual.net...
On Tue, 6 Apr 2004 08:04:31 -0700, BJ Freeman wrote:
here is the compete line
<input name="<%= trim(Request.Form(I)(1))%>" type="hidden" value="<%=
trim(Request.Form(I)(2))%>">
Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.

Anyway, Form is a Collection of Request Object, so you can use the Key for
obtain the name of a element.

For Example:

Request.Form.Key(1)

--
C'ya,
ZER0 :: coder.gfxer.webDesigner();

Non esistono donne brutte. Dipende solo da quanta vodka bevi.
(proverbio russo)

Jul 23 '05 #11
Not sure where you got the split from. I did not show any code with split in
it in the first two messages.
I did use trim, however that is a JavaScript set of functions I use.

"Brian Genisio" <Br**********@yahoo.com> wrote in message
news:40********@10.10.0.241...
Richard Cornford wrote:
ZER0 wrote:
<snip>
Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.


<snip>

Rubbish, JScript is an ECMAScript implementation and so completely on
topic for this group.

Richard.


No, I think ZERO is right. This is VBS code, not JScript code. In ASP,
as far as I know, the following code is ASP:

<% =Split("THIS IS A TEST")(0) %>

where the following is JScript:

<% ="THIS IS A TEST".split(" ")[0] %>

The OP was using both the VBScript form of Split, and the VBScript form
of array indexing. Unless I am missing your point, I believe this is OT.

Brian

Jul 23 '05 #12
still have not figured out how you think that is vbs.

"Tim Slattery" <Sl********@bls.gov> wrote in message
news:8m********************************@4ax.com...
"Richard Cornford" <Ri*****@litotes.demon.co.uk> wrote:
ZER0 wrote:
<snip>
Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.

<snip>

Rubbish, JScript is an ECMAScript implementation and so completely on
topic for this group.


Yup, JScript is exactly that. But the text that OP submitted was
written in VBScript, not JScript, hence ZERO's comment.

--
Tim Slattery
Sl********@bls.gov

Jul 23 '05 #13
On Tue, 6 Apr 2004 15:53:11 -0700, BJ Freeman wrote:
Not sure how you evaluated that line of code to be VBA. It is JavaScript.


VBA? Maybe you mean VBS..?

Anyway, I don't understand what you're talking about. Which code?

--
C'ya,
ZER0 :: coder.gfxer.webDesigner();

"Lo dice il buon senso, ma il buon senso non e' uno standard".
(Jeffrey Zeldman)
Jul 23 '05 #14
BJ Freeman wrote:
Not sure where you got the split from. I did not show any code with split in
it in the first two messages.
I did use trim, however that is a JavaScript set of functions I use.

"Brian Genisio" <Br**********@yahoo.com> wrote in message
news:40********@10.10.0.241...
Richard Cornford wrote:

ZER0 wrote:
<snip>

Mhm.. this seems ASP/VBS not ASP/JScript.. in that case, you're OT.

<snip>

Rubbish, JScript is an ECMAScript implementation and so completely on
topic for this group.

Richard.


No, I think ZERO is right. This is VBS code, not JScript code. In ASP,
as far as I know, the following code is ASP:

<% =Split("THIS IS A TEST")(0) %>

where the following is JScript:

<% ="THIS IS A TEST".split(" ")[0] %>

The OP was using both the VBScript form of Split, and the VBScript form
of array indexing. Unless I am missing your point, I believe this is OT.

Brian


*doat* You are right... I read it once, and did something else, and did
not re-read it. Sorry :)

Brian

Jul 23 '05 #15

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Christopher Brandsdal | last post: by
reply views Thread by Frank 'Olorin' Rizzi | last post: by
4 posts views Thread by Olivier Matrot | last post: by
5 posts views Thread by Rory Becker | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.