473,721 Members | 2,234 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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("ItemNam e") End
If%>"
SIZE="40" MAXLENGTH="75">
Sep 22 '05 #1
4 3903
=?Utf-8?B?R2F2TWM=?= wrote on 22 sep 2005 in
microsoft.publi c.inetserver.as p.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("ItemNam e") 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
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.publi c.inetserver.as p.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("ItemNam e") 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
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 misunderstandin g you?
Sep 22 '05 #4
=?Utf-8?B?R2F2TWM=?= wrote on 22 sep 2005 in
microsoft.publi c.inetserver.as p.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
3705
by: Randell D. | last post by:
Folks, Perhaps someone can figure this out - this is 'the process of my script' I have a form whereby I can add multiple contacts to a single address. There is only one firstname/lastname/telephone box - when the user clicks the add button, I read the values from the form fields and record them into a hidden text input field. This part works because during debugging, I have converted the <input type=hidden> into a <input type=text>...
0
1507
by: Bharat Suneja | last post by:
Hi All, I'm running into issues with passing the distinguishedName of a user as a hidden form field in a form from one page to the result page. Page 1: User enters user name in a form field Page 2: Queries AD, gets distinguishedName, binds to the user. Need to add more info to the user if attributes not present. Relevant portion of FORM:
4
5388
by: Fred | last post by:
Hi, i know how to pass a value from Javascript to ASP with a hidden field into a form and submitting it, or with cookies, but here i have to pass a lot of data in an array. There is a list of product the visitor can order by clicking one or more checkboxes. I made a form containing input with type "checkbox" like: <form> <input type="checkbox" name=ck id=ck
1
2032
by: james00_c | last post by:
Greetings- I need to pass multiple email addresses to a "sendto" hidden field in a form. I need to do that because "CC" and "BCC" are not an option. One address webmaster@xyz.com would be hardcoded and another say formuser@xyz would be a user input. A sample of my form looks like: <table> <tr> <td width="100%"> <form name="fname" method="POST"
10
558
by: Frank Rizzo | last post by:
Ok, this is probably so simple... Anyway, I'd like to pass a value in the hidden variable. I have code like this: <form...> <input type="Hidden" name="zzz" value="1"> ... </form> I want to replace the value with another when the page gets generated in
7
1774
by: bonnie.tangyn | last post by:
Hello All Could anyone give me some suggestions on passing a long string between ASP pages? I have three asp pages - h_email content.asp, h_process_email.asp and h_preview_email.asp In the h_email_content.asp, user can enter their To, CC, From, email content and other information. In this page, there are two buttons at the bottom- "preview email" and "send email".
11
3102
by: viki1967 | last post by:
Hidden field Hello my friends. This is a htm page that contains a form open in window popUp ( page daughter ). This form insert a value in the one hidden field called "tec", in other form open in the page mother. As you can see the select contains multiple attribute.
9
2553
by: JRough | last post by:
I tried to pass the $result from a mysql_query in a url like this line Header("Location:clm_historyXL.php?_result=".$result); but on the redirect location clm_history.php page I get an error on this line: $result = $_POST; I need the $result on the clm_historyXL page to print a list to excel because of a header already being sent.
9
30129
by: nicnac | last post by:
Hi, I'm self learning javascript - so any pointers are welcomed!! I have an issue passing a form and array from one function to another. I tried many variations ! I can't get this to work and I can't get this issue out of my head !!!! So I'm obviously missing something really simple and can't see it or it can't be done with my limited knowledge. I know that I can use a cookie to store the array as string - I have this working but...
0
8840
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8730
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9215
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9131
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5981
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4753
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3189
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2130
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.