Hi,
so i got script like that
[CODE=javascript]
var div_box = document.create Element("div");
div_box.setAttr ibute("id", "music_box" );
div_box.style.t op = (Number(cords[1]) - 10) + "px";
div_box.style.l eft = (Number(cords[0]) - 10) + "px";
document.body.a ppendChild(div_ box);
var mb_element = document.create Element("div");
mb_element.setA ttribute("id", "mb_element ");
mb_element.inne rHTML = "Test";
$.id("music_box ").appendChild( mb_element);
$.addEventListe ner($.id("music _box"), "mouseout", function() {
document.body.r emoveChild($.id ("music_box" ));
});
[/CODE]
and when mouseout i got this error on mozilla firebug
what is wrong????
so i got script like that
[CODE=javascript]
var div_box = document.create Element("div");
div_box.setAttr ibute("id", "music_box" );
div_box.style.t op = (Number(cords[1]) - 10) + "px";
div_box.style.l eft = (Number(cords[0]) - 10) + "px";
document.body.a ppendChild(div_ box);
var mb_element = document.create Element("div");
mb_element.setA ttribute("id", "mb_element ");
mb_element.inne rHTML = "Test";
$.id("music_box ").appendChild( mb_element);
$.addEventListe ner($.id("music _box"), "mouseout", function() {
document.body.r emoveChild($.id ("music_box" ));
});
[/CODE]
and when mouseout i got this error on mozilla firebug
Code:
[Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLBodyElement.removeChild]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: http://msounds.lietuvoje.com/main_js.js :: anonymous :: line 365" data: no]
[Break on this error] document.body.removeChild($.id("music_box"));
Comment