473,385 Members | 1,642 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,385 software developers and data experts.

Dyanmic names for text fields

I am creating an Web order system in dreamweaver. I have a page with a
list of possible items for a customer listed in a repeating region with
text boxes to enter quantity. Each field has a unique name in each row
qty1, qty2 etc. I have another field for due date that I would like to
move into a hidden field that I have also placed in each repeating
region. Instead of having code that looks like this

form.duedate1.value = form.x_duedate.value;
form.duedate2.value = form.x_duedate.value;
form.duedate3.value = form.x_duedate.value;

x_duedate is a text field
duedateX is a hidden field in each repeating region

I would like to be able to create a loop since the number of items to
choose from will vary. I already have a loop created with a variable
named x which is the total number of rows (items). Probably fairly
simple I just didn't know how to referrence each duedate hidden field.

Thanks!

Aug 14 '06 #1
2 1106

jo*******@hotmail.com wrote:
I am creating an Web order system in dreamweaver. I have a page with a
list of possible items for a customer listed in a repeating region with
text boxes to enter quantity. Each field has a unique name in each row
qty1, qty2 etc. I have another field for due date that I would like to
move into a hidden field that I have also placed in each repeating
region. Instead of having code that looks like this

form.duedate1.value = form.x_duedate.value;
form.duedate2.value = form.x_duedate.value;
form.duedate3.value = form.x_duedate.value;

x_duedate is a text field
duedateX is a hidden field in each repeating region

I would like to be able to create a loop since the number of items to
choose from will vary. I already have a loop created with a variable
named x which is the total number of rows (items). Probably fairly
simple I just didn't know how to referrence each duedate hidden field.
for (var i=1; i<=x; i++){
form.elements['duedate' + i].value = form.elements['x_duedate' +
i].value;
}
Read the FAQ:
<URL: http://www.jibbering.com/faq/#FAQ4_13 >
--
Rob

Aug 15 '06 #2

RobG wrote:
jo*******@hotmail.com wrote:
I am creating an Web order system in dreamweaver. I have a page with a
list of possible items for a customer listed in a repeating region with
text boxes to enter quantity. Each field has a unique name in each row
qty1, qty2 etc. I have another field for due date that I would like to
move into a hidden field that I have also placed in each repeating
region. Instead of having code that looks like this

form.duedate1.value = form.x_duedate.value;
form.duedate2.value = form.x_duedate.value;
form.duedate3.value = form.x_duedate.value;

x_duedate is a text field
duedateX is a hidden field in each repeating region

I would like to be able to create a loop since the number of items to
choose from will vary. I already have a loop created with a variable
named x which is the total number of rows (items). Probably fairly
simple I just didn't know how to referrence each duedate hidden field.

for (var i=1; i<=x; i++){
form.elements['duedate' + i].value = form.elements['x_duedate' +
i].value;
}
Read the FAQ:
<URL: http://www.jibbering.com/faq/#FAQ4_13 >
--
Rob
Perfect! thanks I really appreciate your help!!!!!

Aug 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: JDS | last post by:
Hi, all. I'd like to do the following, preferably *without* resorting to JavaScript: I have a long, dynamically-generated form questionnaire. Not all of the form fields are dynamically...
0
by: gotcha | last post by:
I have a little code to add multiple items to a shopping cart based page. This code works perfect, but it adds all of the info to the same input fields every time it loops. I need it to change...
9
by: Paul Morrow | last post by:
I have seen the technique where a number of rows in a database are displayed in an html table so that each column of each row is editable. They use a single form surrounding the table, where each...
1
by: Steve | last post by:
I have looked through the newsgroup for an answer to this but haven't been able to find anything resembling my situation. What I want to do is relatively simple, I think. I have a crosstab...
3
by: Billy | last post by:
I do a SELECT * from table command in an ASP page to build a text file out on our server, but the export is not to allow a field name rows of records. The first thing I get is a row with all the...
1
by: Billy | last post by:
I do a SELECT * from table command in an ASP page to build a text file out on our server, but the export is not to allow a field name rows of records. The first thing I get is a row with all the...
4
by: Bob | last post by:
Hi all, I've got a table that I've imported and it has junk at the top of the table, so after import I run a delete query to remove the junk lines then I'm left with the field names I want for...
2
by: =?Utf-8?B?UGFkYW0=?= | last post by:
i have created couple of dynamic controls (dropdownlist and imagebutton) in webuser controls and assigned selected index change event and image button clicked. I am giving names to control...
1
by: pupilstuff | last post by:
hi guys i wan to make dyanmic crystal report according to values which i checked from check box thats all i did 1. I made data set having data table name "Customer" 2 i put four columm id,name...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.