By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,269 Members | 1,561 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,269 IT Pros & Developers. It's quick & easy.

Pass hidden form field value to another form field to insert in db

P: n/a
Hello I am new to internet programming and wonder if anyone can help me with
this....

I am trying to pass a hidden field value on a form into another field on the
form so that it can then be inserted in the database, to enable me then to
reference that number at a later date.

(The hidden value (1 for example) would then automatically get passed to the
other input field.)

The code for the text field that allows users to type an number into it for
submission to the db is below, but what code do i need within the hidden
field to populate this text field below so that users do not have to type the
number in?

Any help would be appreciated.

G.

<INPUT TYPE="text" NAME="ItemName1"
VALUE="<% If Not blnNew Then Response.Write rsItem("ItemName") End
If%>"
SIZE="40" MAXLENGTH="75">
Sep 22 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
=?Utf-8?B?R2F2TWM=?= wrote on 22 sep 2005 in
microsoft.public.inetserver.asp.general:
Hello I am new to internet programming and wonder if anyone can help
me with this....

I am trying to pass a hidden field value on a form into another field
on the form so that it can then be inserted in the database, to enable
me then to reference that number at a later date.

(The hidden value (1 for example) would then automatically get passed
to the other input field.)

The code for the text field that allows users to type an number into
it for submission to the db is below, but what code do i need within
the hidden field to populate this text field below so that users do
not have to type the number in?

Any help would be appreciated.
What you ask seems to be clientside, so OT on this serverside NG.

Serverside you don't need a hidden field. Just programm what you want.

<INPUT TYPE="text" NAME="ItemName1"
VALUE="<% If Not blnNew Then Response.Write
rsItem("ItemName") End If%>"
This can be done,
but if this is an oneline if-then should not have an End If
[However ASP-vbs has a bug that allows it]
SIZE="40" MAXLENGTH="75">



--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Sep 22 '05 #2

P: n/a
The code i am using currently on the site works. But i dont want users to
have to type anything in the field, that is why i want to use a hidden field
that fills the form field to then submit it to the database

"Evertjan." wrote:
=?Utf-8?B?R2F2TWM=?= wrote on 22 sep 2005 in
microsoft.public.inetserver.asp.general:
Hello I am new to internet programming and wonder if anyone can help
me with this....

I am trying to pass a hidden field value on a form into another field
on the form so that it can then be inserted in the database, to enable
me then to reference that number at a later date.

(The hidden value (1 for example) would then automatically get passed
to the other input field.)

The code for the text field that allows users to type an number into
it for submission to the db is below, but what code do i need within
the hidden field to populate this text field below so that users do
not have to type the number in?

Any help would be appreciated.


What you ask seems to be clientside, so OT on this serverside NG.

Serverside you don't need a hidden field. Just programm what you want.

<INPUT TYPE="text" NAME="ItemName1"
VALUE="<% If Not blnNew Then Response.Write
rsItem("ItemName") End If%>"


This can be done,
but if this is an oneline if-then should not have an End If
[However ASP-vbs has a bug that allows it]
SIZE="40" MAXLENGTH="75">



--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Sep 22 '05 #3

P: n/a
CJM
Why have a field that does nothing - ie you dont want the user to enter
anything into the field?

If you are meaning that you want to use the value in the hidden field if the
user chooses not to enter a value in the visible field then you just need to
pick this up when you process the form (post-submission)...

Or am I misunderstanding you?
Sep 22 '05 #4

P: n/a
=?Utf-8?B?R2F2TWM=?= wrote on 22 sep 2005 in
microsoft.public.inetserver.asp.general:
"Evertjan." wrote:

What you ask seems to be clientside, so OT on this serverside NG.

[please do not toppost on usenet]
The code i am using currently on the site works. But i dont want users
to have to type anything in the field, that is why i want to use a
hidden field that fills the form field to then submit it to the
database


This is not useful.

The information exists on the server,
so why send it hidden to the client to get it back?

Keep it on the server in a session variable,
and on submit, send it to the database.

-
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Sep 22 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.