I've encountered an issue while running the code and I'm having trouble figuring out what's causing it. The code was running fine before, but now I'm facing this problem:
function makeUnderline(formName,editor) {
var txt = window.prompt("Enter the text you wish to be underlined.", "Enter Text Here");
if (txt != null) {
document.formName.editor.value += "<u>" + txt + "</u>";
}
document.formName.editor.focus();
}
<input type="button" name="bUnderline" value=" underline " onClick="makeUnderline('formFaqs','answer');" alt="Use this button to create text that is underlined." title="Use
this button to create text that is underlined.">
The error message I'm receiving is:
TypeError: document.formName is undefined
document.formName.editor.value += "<u>" + txt + "</u>";