How am I supposed to concatenate this?
here's my javascript code
var c0 = document.all.ntext.value;
var c1 = document.all.stext.value;
var x;
for(x=0; x<2; x++)
{
a.innerHTML = c //contatenation needed
}
var c0 = document.all.ntext.value;
var c1 = document.all.stext.value;
var x;
for(x=0; x<2; x++)
{
a.innerHTML = c0 + с1
}
Is that what you want?
It'll be much better if you'll go this way:
var c = [document.all.ntext.value, document.all.stext.value];
var x;
for(x=0; x<c.length; x++)
{
a.innerHTML += c[0];
}
var needed = ['ntext', 'stext'];
a.innerHTML = needed.map(function(key) {
return document.all[key].value;
}).join('');
.map need a shim for old browsers.
document.all, it is a non-standard IE4ism.