I have multiple, dynamically generated editors on my ASP page. When I save the page, however, I need the Javascript to loop through each editor to execute the Save function. However, the Save function doesn't seem to accept a generated string and is looking for something hardcoded. Is this true? Know of a workaround? Here's my code:
for ( var i=0,n=document.forms[0].elements.length; i<n; i++ )
{
var field = document.forms[0].elements[i];
myString = field.name;
if (myString.indexOf("_HTMLContent") > 0) {
myStringSave = myString.slice(0,myString.length-12);
// alert(myStringSave);
save(myStringSave);
}
}
Thanks in advance for any help. Cheers, Kris.