But... the strangest thing...
In the google chrome browser, the popup works perfectly
In firefox, the only problem is that it doesnt move correctly when the page is stretched from side to side
In IE, the popup does not move away from the top left corner... ever...
Code to bring up the window in the iframe
Code:
recipebox=parent.window.dhtmlwindow.open('recipebox', 'ajax', 'windowfiles/external3.html?recipeID=33', '', 'width=520px,height=570px,left=100px,top=500px')
var anchorelement=parent.document.getElementById("videolist")
recipebox.moveTo(anchorelement.offsetLeft, anchorelement.offsetTop)
Code to reposition it in the parent window
Code:
<script type="text/javascript">
function resizepopup()
{
var anchorelement=document.getElementById("videolist")
recipebox.moveTo(anchorelement.offsetLeft, anchorelement.offsetTop)
}
</script>
Code I had to change in the javascript to make the move to work for scrolling up and down
Code:
moveTo:function(t, x, y){ //move window. Position includes current viewpoint of document
this.getviewpoint() //Get current viewpoint numbers
t.style.left=(x=="middle")? this.scroll_left+(this.docwidth-t.offsetWidth)/2+"px" : this.scroll_left+parseInt(x)+"px"
t.style.top=(y=="middle")? this.scroll_top+(this.docheight-t.offsetHeight)/2+"px" : parseInt(y)+"px"
Bookmarks