In my jsni form, I have implemented a click handler on the save button. When the save button is clicked, I would like the specific div to be greyed out to indicate that data is being saved.
var x=$doc.createElement("div");
x.id="nn";
var lbl=$doc.createElement("Label");
var labelText = $doc.createTextNode("FirstName: ");
lbl.appendChild(labelText);
x.appendChild(lbl);
var a=$doc.createElement("input");
x.appendChild(a);
var br = $doc.createElement("br");
x.appendChild(br);
var lblcl=$doc.createElement("Label");
var labelText1 = $doc.createTextNode(" LastName: ");
lblcl.appendChild(labelText1);
x.appendChild(lblcl);
var b=$doc.createElement ("input");
x.appendChild(b);
var br = $doc.createElement("br");
x.appendChild(br);
var lblc=$doc.createElement("Label");
var labelText2= $doc.createTextNode("CollegeName: ");
lblc.appendChild(labelText2);
x.appendChild(lblc);
var p=$doc.createElement("input");
x.appendChild(p);
var br = $doc.createElement("br");
x.appendChild(br);
var lblcl=$doc.createElement("Label");
var labelText3= $doc.createTextNode(" SchoolName: ");
lblcl.appendChild(labelText3);
x.appendChild(lblcl);
var q=$doc.createElement ("input");
x.appendChild(q);
var yu = document.createElement("br");
x.appendChild(yu);
var tr=$doc.createElement("Button");
var buttonTxt = $doc.createTextNode("Save");
tr.appendChild(buttonTxt);
x.appendChild(tr);
body.appendChild(x);
I have code to grey out the element, but I am unsure of where to place it within my existing code.
overlay = document.createElement("div")
overlay.style.width = _width + "px"
overlay.style.height = _height + "px"
overlay.style.position = "absolute"
overlay.style.background = "#dedede"
overlay.style.top = _top + "px"
overlay.style.left = _left + "px"
overlay.style.filter = "alpha(opacity=50)"
overlay.style.opacity = "0.5"
overlay.style.mozOpacity = "0.5"