I had created a form as follow:


function makeForm() {

mypara=document.getElementById("paraID");
myform=document.createElement("formIS");
myselect = document.createElement("select");

theOption=document.createElement("OPTION");
theText=document.createTextNode("Revenue");
theOption.setAttribute("value","Revenue");
theOption.appendChild(theText);
myselect.appendChild(theOption);

theOption=document.createElement("OPTION");
theText=document.createTextNode("Expenses");
theOption.appendChild(theText);
theOption.setAttribute("value","Expenses");
myselect.appendChild(theOption);

myform.appendChild(myselect);
mypara.appendChild(myform);
myselect.onchange=TitleOnChange;
mybreak=document.createElement("p");
myform.appendChild(mybreak);

myform.setAttribute("id","formIS");

}



I had identified the form with and id: myform.setAttribute("id","formIS");


Now I would like to identify my form to apply an IF instruction: something like:


myform=document.getElementById("formIS");
if (myform == "formIS")


I tried all the following options and none worked. Does anyone knows why?


if (myform.id == "formIS")
if (myform.id.value == "formIS")



I also tried to debug the code and this is what I see when I put the mouse over myform --> formis#formIS

Thanks you very much