javascript issue
Hey guys, not sure whether posted this in correct forum, so please move it if that's a case. (overall working with coldfusion so hopefuly right place)
I'm having a bit of a trouble with one bit of javascript:
var cell3 = row.insertCell(2);
cell3.style.verticalAlign = "top";
var element2 = document.createElement("input");
element2.type = "text";
element2.id = "add1_" + (appname + 1);
element2.name = "add1_" + (appname + 1);
var myName = element2.name;
element2.setAttribute('onBlur', 'initialCap(element2.name)');
cell3.className = "schoolborder";
cell3.appendChild(element2);
bold line is where i'm stuck. I need to pass element2.name value but unless I write : initialCap(add1_1) it doesn't work. Is there any way to insert variable in this place?
cheers,
Simon
