473,396 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 2276
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Christopher Brandsdal | last post by:
Hi! I get an error when I run my code Is there any other way to get te information from my form? Heres the error I get and the code beneath. Line 120 is market with ''''''''''''Line...
4
by: Gerhard Pretorius | last post by:
ON Win 2003 IIS6, Since yesterday, (12 Aug 2003) for some strange reason, (after installing WindowsServer2003-KB823980-x86-ENU.exe) I cannot pass the Request object to to VB COM DLL. I have...
2
by: RobertHillEDS | last post by:
While using the Soap generated ASP code, I would like to dump the raw contents of the request and response objects using Response.AppendToLog. I have tried using variations of the following code,...
0
by: Frank 'Olorin' Rizzi | last post by:
Hello everyone. This is quite convoluted, but I'll try to make it simple. I have a couple of bottom-line questions (I guess): 1~ what happens between the Page_Load routine in the code behind...
8
by: CDARS | last post by:
Hi all, I have a confusing question on ASP.NET cookies usage: 1> Response.Cookies("test").value = Now 2> Response.Write(Request.Cookies("test").value) 3> 4> Response.write("<hr>") 5>...
7
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Make CStr for JavaScript on ASP w/ Request.Form and QueryString In ASP, Request.Form and Request.QueryString return objects that do not support "toString", or any JavaScript string...
6
by: santhoskumara | last post by:
How to request to servlet from Ajax and also I got the DOM object in the servlet through Business Logic. Now how will i pass the DOM object from serlvet to Clientside. Where in the client Side i am...
4
by: Olivier Matrot | last post by:
Hello, I have a problem with an ASP.NET 2.0 Application. A client request is processed in parrallel by two threads. This ends with the following exception : <Source>System</Source> <StackTrace...
5
by: chromis | last post by:
Hi there, I've recently been updating a site to use locking on application level variables, and I am trying to use a commonly used method which copies the application struct into the request...
5
by: Rory Becker | last post by:
I have had code in my Application_Start which is intended to run once at the start of my application's life. It loads connection information and similar from a known location. However I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.