@ricpJan 03.2007 — #By using the createElement method, like so..
<i> </i>var myDiv = document.createElement("myDiv"); myDiv.innerHTML = "I was dynamically created"; myDiv.style.border = "5px dotted red"; myDiv.style.padding = "20px"; document.body.appendChild(myDiv);
That would create and append a <div> to the <body>. Obviously appendChild will only append the element to the bottom of the HTML (and to the bottom of the page unless you set style to position it). There are also the.. <i> </i>parentObj.removeChild(childObj); parentObj.replaceChild(newChildObj, oldChildObj);
..methods. parentObj in that instance is a reference to the parent, er, object.. ?
@darkling235authorJan 04.2007 — #Thanks that clears a few things up. One question: is it legal in javascript to rewrite the contetx menu after a page has been loaded?
@darkling235authorJan 08.2007 — #Basically I need to set what the context menu options will be. At the moment really nothing pops up except a black bar. No menu items at all. My code is