473,586 Members | 2,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting offsetParent not working

12 New Member
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."

Expand|Select|Wrap|Line Numbers
  1. function SetOffsetParent(editor)
  2.   {
  3.   editor.offsetParent = document;
  4.   }
  5.  
  6. function SetOffsetParent(editor)
  7.   {
  8.   editor.offsetParent = editor.offsetParent.offsetParent;
  9.   }
  10.  
Nov 26 '07 #1
2 2394
mrhoo
428 Contributor
All of the offset properties are read only
Nov 26 '07 #2
T0mm0
12 New Member
All of the offset properties are read only
ah... I did think about that possibility.

Anyone think of any other way to achieve what I'm wanting then?
Nov 26 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
8144
by: Vittore Zen | last post by:
Hi, a little question. I have some nested tables with some divs (so default set is relative - ok?) Now, i need to draw a line from one div to another. The problem is to find the position of div I use these functions:
3
7626
by: ara.pehlivanian | last post by:
I've got a script that determines the true position of an element in the page by cycling up the .offsetParent elements all the way up to the <body> element and tallying up the .offsetLeft values returned by each element. It works fine on the major browsers (IE, Moz, NS) on PC but Safari on the Mac returns "0" for the offsetLeft right off the...
1
2045
by: Ned Baldessin | last post by:
Hi, I have reimplemented the non-standard <marquee> element (in a very simplified fashion), moving around a DIV using offsetParent and offsetWidth. It works fine in Mozilla (1.7.5) and Safari (1.2.4), but fails miserably in IE6/Win : the content scrolls off screen to the right hand side, although it should be going to the left. I've put...
2
15803
by: amattie | last post by:
Anyone know what the specific difference is between the offsetParent and parentNode properties of a DOM element are? Mozilla's docs on the DOM element (http://developer.mozilla.org/en/docs/DOM:element) don't really indicate much of a difference, but whatever the difference is is really screwing me up in one of my projects. On a specific div...
5
8098
by: webEater | last post by:
In XHTML mode (application/xhtml+xml) Firefox does not know offset properties (offsetParent/Left/Top). In all the other browsers it works. Does someone has the same problem or knows a solution for this? Example: .... <body> <div><div id="hello">Hey</div></div>
1
3642
by: Orion | last post by:
In my code i am trying to access offsetLeft and offsetTop values for a element which is a div, I use offsetParent property to obtain the same. The code i use is this.tip.style.left = this.handle.offsetParent.offsetLeft + 'px'; After debugging i found the value of "this.handle.offsetParent" is set to null. I have problems with Mozilla...
2
2252
by: Geoffrey Summerhayes | last post by:
I'm trying to select a row from a table in a 'dialog box' where the HTML is (boiled down): <body> <div style='position:absolute; display:block;...'> ...other divs... <div style='position:absolute...'> ...other divs... <div style='display:block; overflow:auto; margin-left:auto; margin-right:auto; width:...'>
1
1778
by: Fabian Lenzen | last post by:
Hi, I’m creating a web application using XUL and SVG. My problem: I’ve tried to draw for example a dot where the user clicks in the SVG area. I get the clientX/Y-data of the event, but I also have to determine the coordinates of the SVG-area in the XUL-document. I was said to use offsetParent, offsetLeft and offsetTop. Unfortunately, Firefox...
3
2960
by: Patient Guy | last post by:
Can anyone point to THE definition or THE standard for the useful DOM node property 'offsetParent'? It clearly seems de facto, and not de jure ("official"). This is acceptable, especially if the definition/standard comes from its originator. I intend to set up code to deal with exceptions in its usage.
0
7912
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8202
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8216
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6614
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3837
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.