Sounds simple enough but I can't find any reasonable examples. I'm probably not looking hard enough.
I want a series of input boxes in a form. Stick some info in each and then to either click a button or the output be generated live (AJAX?) with the result being the input concatenated with certain characters between the input text.
So
Box 1 : texta
Box 2 : textb
Box 3 : textc
Box 4 : textd
Output : texta;textb:textc:textd
(the semicolon was intentional)
Any ideas?
result = [box1.value, box2.value, box3.value].join(";");
It needs to be a variety of things. Well, one ; and the rest :
Oh, and some nothing at all.
result = box1.value + ";" + [box2.value, box3.value, box4.value].join(":");
=(CONCATENATE(A11,";",B11,":",C11,":",D11,E11,F11,G11,":",H11,":",I11,":",J11,K11,":",L11,":",M11,":",N11,":",O11,":",P11,":",Q11,":",R11))
result = [ box1.value, ";", box2.value, ":", box3.value, ":", box4.value, box5.value, // etc. box23.value ].join("");You could probably imagine ways to make it more efficient/cleaner, e.g. join all the colon-separated bits first, then add them to the other ones.
I'm sorry. I meant to say thanks.
I'm so rude :-(