I'm trying to set the offsetParent property of an object to a reference to document rather than the relatively positioned container that it's in.
The reason for this is that the object is a WYSIWYG editor that is regularly statically positioned but has a full screen mode where it becomes absolutley positioned. It normally sits in a relatively positioned container so when I come to fullscreen it it grows to the 0,0 point of the container rather than the document.
So I've tried several different ways and VWD tells me "htmlfile: Member not found."
The reason for this is that the object is a WYSIWYG editor that is regularly statically positioned but has a full screen mode where it becomes absolutley positioned. It normally sits in a relatively positioned container so when I come to fullscreen it it grows to the 0,0 point of the container rather than the document.
So I've tried several different ways and VWD tells me "htmlfile: Member not found."
Code:
function SetOffsetParent(editor)
{
editor.offsetParent = document;
}
function SetOffsetParent(editor)
{
editor.offsetParent = editor.offsetParent.offsetParent;
}
Comment