I have a javascript function that edits the content in a div and I want it to add a new line at the end of the line. How do I do this.
Here is my code
<code>
function ValidateSmoker(FormValid)
{
if (document.diabetesform.optSmoker(0).checked || document.diabetesform.optSmoker(1).checked)
{
document.getElementById(‘SmokerErrorMarker’).firstChild.nodeValue = ”;
}
else
{
FormValid = false;
document.getElementById(‘ExplainedErrorMessage’).firstChild.nodeValue = document.getElementById(‘ExplainedErrorMessage’).firstChild.nodeValue + ‘Smoker: Invalid entry. Can not be left blank.’;
document.getElementById(‘SmokerErrorMarker’).firstChild.nodeValue = ‘*’;
}
return FormValid;
}
</code>
Thanks,