S
scaredemz
hi,
so i'm creating a dynamic drop-down menu. the menu and the text show up
fine in IE but only the drop-down shows in Firefox without the menu
text. Below is the fxn code. help pls.
function DropDownHelper(menuArray, top, left, height)
{
var currItem = new String();
var item;
var idStr;
for(var i = 0; i < menuArray.length; i++)
{
currItem = menuArray;
currItemArr = currItem.split(";");
item = document.createElement("div");
idStr = "dropDownMenuId" + i;
ExistingMenuItemIds = idStr;
item.setAttribute('id', idStr);
item.style.visibility = "visible";
item.style.top = top;
item.style.fontFamily = "Arial";
item.style.fontSize = "13pt";
item.style.color = "white";
item.style.fontWeight = "bold";
item.style.position = "absolute";
item.style.height = height;
item.style.left = left;
item.style.width = "200px";
item.style.backgroundColor = "red";
item.style.color = "white";
item.style.cursor = "hand";
item.innerHTML = "<p onclick = \"GoTo('" + currItemArr[1] + "')\">" +
currItemArr[0] + "</p>";
document.body.appendChild(item);
var newtop = GetIntFromProperty(top) + height;
top = newtop + "px";
}
}
so i'm creating a dynamic drop-down menu. the menu and the text show up
fine in IE but only the drop-down shows in Firefox without the menu
text. Below is the fxn code. help pls.
function DropDownHelper(menuArray, top, left, height)
{
var currItem = new String();
var item;
var idStr;
for(var i = 0; i < menuArray.length; i++)
{
currItem = menuArray;
currItemArr = currItem.split(";");
item = document.createElement("div");
idStr = "dropDownMenuId" + i;
ExistingMenuItemIds = idStr;
item.setAttribute('id', idStr);
item.style.visibility = "visible";
item.style.top = top;
item.style.fontFamily = "Arial";
item.style.fontSize = "13pt";
item.style.color = "white";
item.style.fontWeight = "bold";
item.style.position = "absolute";
item.style.height = height;
item.style.left = left;
item.style.width = "200px";
item.style.backgroundColor = "red";
item.style.color = "white";
item.style.cursor = "hand";
item.innerHTML = "<p onclick = \"GoTo('" + currItemArr[1] + "')\">" +
currItemArr[0] + "</p>";
document.body.appendChild(item);
var newtop = GetIntFromProperty(top) + height;
top = newtop + "px";
}
}