Encountering a peculiar problem here. The scripts run smoothly, but the content doesn't display on screen until I "inspect element" and then close the inspector window or zoom in/out. It's not an issue with the "display" CSS property because even after zooming in/out, it remains hidden...
I'm really puzzled as to why this is happening :/
Script:
function css() //create new
{
var qntinputs = document.getElementsByTagName('input');
var j = qntinputs.length + 9;
var i = qntinputs.length;
for (i; i<j;i++)
{
table = document.getElementById("table");
var element = document.createElement('div');
var input = document.createElement("input");
element.className = "cell";
element.style.paddingTop = "0px";
element.style.height = "50px";
input.className = "insert" + i;
if (i == j-1 || i == j-2)
{
if (i==j-1)
{
element.style.width ="100px";
input.style.width ="90px";
input.style.paddingLeft = "5px";
}
else
{
element.style.width ="90px";
input.style.width ="90px";
}
input.type = "checkbox";
}
else
{
if (i == j-4 || i == j-3)
{
input.type = "time";
}
else
{
if (i== j-5)
{
input.type = "date";
}
else
{
if (i== j-6)
{
element.style.width = "90px";
input.style.width = "80px";
}
}
}
}
document.getElementById("table").appendChild(element);
table.appendChild(element);
element.appendChild(input);
}
i = qntinputs.length;
}
Any suggestions on how to force a "refresh" or zoom in and out again to make it appear?