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

Help!Help! How to concatenate ...

Any experts out there can help to solve the following problem:

I have the following Javascript expressions:

temp[0] = document.frmScr1.txtABC
temp[1] = document.frmScr1.txtDEF
temp[2] = document.frmScr1.txtHIJ

And I have created an array to store these values:
ary["ABC","DEF","HIJ"];

Now, the problem is that is it possible to generate a FOR loop to
perform the function as above?
e.g.
for (count=0; count < 3; count++) {
temp[count] = document.frmScr1.txt + ary[count]; // incorrect, guess
only
};

Of course the above code is incorrect, but what should I do or any
suggestion?

Many thanks in advance.
Fed.
Jul 23 '05 #1
2 987
cl*********@yahoo.com.hk (Fed21) writes:
temp[count] = document.frmScr1.txt + ary[count]; // incorrect, guess
only
};

Of course the above code is incorrect, but what should I do or any
suggestion?


<URL:http://jibbering.com/faq/#FAQ4_39>
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #2
Fed.,

You have to expose the value property in the
document.frmScr1.txtOBJECTNAME objects

var temp = new Array();
var ary["ABC","DEF","HIJ"];

temp[0] = document.frmScr1.txtABC.value;
temp[1] = document.frmScr1.txtDEF.value;
temp[2] = document.frmScr1.txtHIJ.value;

for (count=0; count < 3; count++) {
temp[count] = temp[count] + ary[count];
}
Fed21 wrote:
Any experts out there can help to solve the following problem:

I have the following Javascript expressions:

temp[0] = document.frmScr1.txtABC
temp[1] = document.frmScr1.txtDEF
temp[2] = document.frmScr1.txtHIJ

And I have created an array to store these values:
ary["ABC","DEF","HIJ"];

Now, the problem is that is it possible to generate a FOR loop to
perform the function as above?
e.g.
for (count=0; count < 3; count++) {
temp[count] = document.frmScr1.txt + ary[count]; // incorrect, guess
only
};

Of course the above code is incorrect, but what should I do or any
suggestion?

Many thanks in advance.
Fed.

Jul 23 '05 #3

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

Similar topics

0
by: Nick Heppleston | last post by:
I have a concatenation problem and I was wondering if somebody might be able to offer some help :-) I have the following table structure holding product long descriptions: Part...
30
by: priya | last post by:
Hi How to concatenate two integer Values. Example Program : #include "Port.h" #include "BinaryConversion.h" # include "iostream.h"
8
by: Dixie | last post by:
I have the results of a query to send to a mailmerge with Word 2000. The query produces say 6 to 8 records, where only 1 of the fields is different from record to record. I can only have one...
6
by: Sheldon | last post by:
Hi, I am trying to build a large array using concatenate function in python. So as I loop over the number of arrays, of which there are 12 (4 down and 3 across), I create 3 long arrays by...
14
by: metamorphiq | last post by:
Hello, I'm a Java programmer, so I'm probably asking a very simple question here, but I have trouble solving it :) I'd like to know how you concatenate multiple (4, in my case) char* in C++,...
2
by: exapplerep | last post by:
I've seen how to use VBA code to concatenate two fields into a third by using an expression in the "After Update" property in fields 1 & 2. field3 = field1 + field2 The above code would go...
4
by: Dan | last post by:
Hi all, I am creating a search table where the keywords field is made up of several text fields and this is causing me some problems. I can concatentate the text ok but i can't seem to concatenate...
12
by: parth | last post by:
Hi I want to achieve the following transformation of data using a stored procedure. Source col1 col2(varchar) -------------------------
13
by: sinbad | last post by:
hi, how to concatenate a "hash defined" constant value to another "hash defined" constant string. For example #define ABC 100 #define MYSTR "The value of ABC is" Now i need a string that...
10
by: Aaron Hoffman | last post by:
Hello, I'm hoping someone might be able to offer some guidance to my problem. I have one query in MS Access which consists of 2 tables joined by a SEQUENCE_ID. By joining the two tables I am...
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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.