Hello:
I am using the following JavaScript function:
function Projects()
{
var PrjTb1 = "<input type=text id=PrjNme size=100/>"
var PrjTb2 = "<textarea rows=5 col=200 wrap=hard></textarea>"
var Info = "1. Project or activity name:<br>" + PrjTb1 + "<br><br>2. Project or activity description:<br>" + PrjTb2
if (document.getElementById('PrjNo').value == 1)
{
document.getElementById('AllPrj').innerHTML = "<b>Project or activity 1.</b><br><br>" + Info
}
}
This function executes well, after an onclick event; however, certain portions of the HTML within the declared variables are not working. For example, within the variable PrjTb2
, my textarea's rows and columns do not change. Also, I cannot add the HTML tags <dd>
and </dd>
anywhere within the variables to create an indentation. What is interesting is that both the textarea properties and the HTML tags, <dd>
and </dd>
, work within the body of my form, just not in my JS function. Would anyone know what I am doing wrong.
Thank you,
DFM