K
kantix
Here is my function:
function fnc_PopUp(source, title, widthPOP, heightPOP){
var openX = (845/2)-(heightPOP/2);
var openY = (1259/2)-(widthPOP/2);
newDivBckgr = document.createElement('div')
document.body.appendChild(newDivBckgr)
newDivBckgr.className = 'bckgr'
tableDiv = document.createElement('div')
tableDiv.className = 'tableDiv'
tableDiv.style.top = openX + 'px'
tableDiv.style.left = openY + 'px'
tableDiv.align = 'left'
document.body.appendChild(tableDiv)
newTable = document.createElement('table')
newTable.border = 1
newTable.className = 'table'
newTable.cellPadding = '0'
newTable.cellSpacing = '0'
tableDiv.appendChild(newTable)
newTbody = document.createElement('tbody')
newTable.appendChild(newTbody)
newTr = document.createElement('tr')
newTbody.appendChild(newTr)
newTdTitle = document.createElement('td')
newTr.appendChild(newTdTitle)
newImg = document.createElement('img')
newImg.src = "/js/img/close.png"
newTdTitle.appendChild(newImg)
newImg.style.position = 'relative'
newImg.align = 'right'
newImg.style.top = '1px'
newImg.onclick = function() {fnc_ClosePopUp()}
newTxt = document.createTextNode(title)
newTdTitle.className = 'tdTitle'
newTdTitle.appendChild(newTxt)
newiframeTr = document.createElement('tr')
newTbody.appendChild(newiframeTr)
newiframeTd = document.createElement('td')
newiframeTr.appendChild(newiframeTd)
newiframe = document.createElement('iframe')
newiframe.iframeBorder = "0"
newiframe.src = source
newiframe.style.width = widthPOP + 'px'
newiframe.style.height = heightPOP + 'px'
newiframeTd.appendChild(newiframe)
}
function fnc_ClosePopUp(){
document.getElementsByTagName('body')[0].removeChild(tableDiv)
document.getElementsByTagName('body')[0].removeChild(newDivBckgr)
document.body.style.overflow = 'scroll'
}
Btw, i tried this: http://msdn.microsoft.com/library/d...en-us/ietechcol/dnwebgen/ie_leak_patterns.asp
and it didn't helped.
function fnc_PopUp(source, title, widthPOP, heightPOP){
var openX = (845/2)-(heightPOP/2);
var openY = (1259/2)-(widthPOP/2);
newDivBckgr = document.createElement('div')
document.body.appendChild(newDivBckgr)
newDivBckgr.className = 'bckgr'
tableDiv = document.createElement('div')
tableDiv.className = 'tableDiv'
tableDiv.style.top = openX + 'px'
tableDiv.style.left = openY + 'px'
tableDiv.align = 'left'
document.body.appendChild(tableDiv)
newTable = document.createElement('table')
newTable.border = 1
newTable.className = 'table'
newTable.cellPadding = '0'
newTable.cellSpacing = '0'
tableDiv.appendChild(newTable)
newTbody = document.createElement('tbody')
newTable.appendChild(newTbody)
newTr = document.createElement('tr')
newTbody.appendChild(newTr)
newTdTitle = document.createElement('td')
newTr.appendChild(newTdTitle)
newImg = document.createElement('img')
newImg.src = "/js/img/close.png"
newTdTitle.appendChild(newImg)
newImg.style.position = 'relative'
newImg.align = 'right'
newImg.style.top = '1px'
newImg.onclick = function() {fnc_ClosePopUp()}
newTxt = document.createTextNode(title)
newTdTitle.className = 'tdTitle'
newTdTitle.appendChild(newTxt)
newiframeTr = document.createElement('tr')
newTbody.appendChild(newiframeTr)
newiframeTd = document.createElement('td')
newiframeTr.appendChild(newiframeTd)
newiframe = document.createElement('iframe')
newiframe.iframeBorder = "0"
newiframe.src = source
newiframe.style.width = widthPOP + 'px'
newiframe.style.height = heightPOP + 'px'
newiframeTd.appendChild(newiframe)
}
function fnc_ClosePopUp(){
document.getElementsByTagName('body')[0].removeChild(tableDiv)
document.getElementsByTagName('body')[0].removeChild(newDivBckgr)
document.body.style.overflow = 'scroll'
}
Btw, i tried this: http://msdn.microsoft.com/library/d...en-us/ietechcol/dnwebgen/ie_leak_patterns.asp
and it didn't helped.