IE7 DOM problem
Hej,Er der nogle der ved hvor da jeg kan få IE7 til at fatte disse to funktioner!! :
function EndMove(loc,after){
MoveHtml = document.getElementById(MoveCopyPart).innerHTML;
var AfterCheck = "target_" + MoveCopyPart;
if(after!= AfterCheck){
document.getElementById(MoveParent).removeChild(document.getElementById(MoveCopyPart));
document.getElementById(MoveParent).removeChild(document.getElementById("target_"+MoveCopyPart));
var NDiv=document.createElement('div');
NDiv.innerHTML = MoveHtml;
NDiv.setAttribute('id',MoveCopyPart);
NDiv.onmouseover='java script:SetEditMenu(this.id,this.parentNode.id)';
NDiv.setAttribute('onmouseover',"java script:SetEditMenu(this.id,this.parentNode.id)");
NDiv.setAttribute('class','test');
document.getElementById(loc).insertBefore(NDiv,document.getElementById(after));
var TDiv=document.createElement('div');
TDiv.innerHTML = "";
TDiv.setAttribute('id',"target_" + MoveCopyPart);
TDiv.setAttribute('style',"display:block;");
TDiv.setAttribute('onclick',"java script:EndMove(this.parentNode.id,this.id)");
TDiv.setAttribute('class','target');
document.getElementById(loc).insertBefore(TDiv,document.getElementById(MoveCopyPart));
}
}
function SetEditMenu(ObjId,Parent) {
//alert(Parent);
var Obj = document.getElementById(ObjId);
var curleft = curtop = 0;
if (Obj.offsetParent) {
do {
curleft += Obj.offsetLeft;
curtop += Obj.offsetTop;
} while (Obj = Obj.offsetParent);
var d = document.getElementById(ObjId);
document.getElementById('floateditmenu').style.height = d.offsetHeight + "px";
document.getElementById('floateditmenu').style.width = d.offsetWidth + "px";
document.getElementById('floateditmenu').style.left = d.offsetLeft;
document.getElementById('floateditmenu').style.top = d.offsetTop;
document.getElementById('floateditmenu').style.visibility = "visible";
//document.getElementById('floateditmenu').style.top = curtop + "px";
//document.getElementById('floateditmenu').style.left = curleft + "px";
document.getElementById('floateditmenu').innerHTML = "<div id=\"floateditmenubox\"><div class=\"floatLeft\"><a href=\"java script:ShowMove('infofollow',15,0,false,false,'"+ Parent +"','" + ObjId +"')\" >move</a></div><div class=\"floatLeft\"><a href=\"java script:RemoveItem('"+ Parent +"','" + ObjId +"')\" >remove</a></div></div>";
}
}