Forum Moderators: open
[code]
for(var i=0; i<a.length; i++)
{
var tempItem = null;
tempItem = document.createElement("menuitem");
t = a[i].split("¦¦");
tempItem.setAttribute("label", t[0]);
tempItem.setAttribute("tooltiptext", t[0]);
tempItem.setAttribute("oncommand", "dosomething");
tempItem.setAttribute("class", "menuitem-iconic");
var url=new URL(t[1]);
var purl = "http://" + url.getHost() + "/image.gif";
tempItem.setAttribute("image", purl);
hotmenu.appendChild(tempItem);
}
in this line of code,
tempItem.setAttribute("image", purl);
I am setting the attribute menuitem.image to the url containing the image,
if there is a way to create a javascript code to get an image and save it in the internet temp files it might also be a solution
thanks for your help