Hi,
when I have this code in my script:
pos_y = document.getEle mentById('holdm enu').offsetTop ;
The menu get's positioned at the very top of the site - really
annoying. On FireFox it works good. If I put this script part at the
very end of the body, it works, too.
Can you help me what's wrong here?
--
-Gernot
Post here, don't email. If you feel you have to mail, revert my
forename from: to************* *************** **@invalid.com
_______________ _______________ __________
Looking for a good game? Do it yourself!
GLBasic - you can do www.GLBasic.com 2 4313
Gernot Frisch wrote: when I have this code in my script: pos_y = document.getEle mentById('holdm enu').offsetTop ;
The menu get's positioned at the very top of the site - really annoying. On FireFox it works good. If I put this script part at the very end of the body, it works, too.
"offsetTop" is calculated in regards of the offsetParent, a container
element. Your problem may be related to your setting styles for one of
this container element after reading the offsetTop value (check any
absolute-positioned elements). In that case, browsers' implementation
could take the change into account quite differently.
Could you post some lines demonstrating the issue?
Regards,
Yep.
"Yann-Erwan Perio" <y-*******@em-lyon.com> schrieb im Newsbeitrag
news:40******** *************** @news.free.fr.. . Gernot Frisch wrote:
when I have this code in my script: pos_y = document.getEle mentById('holdm enu').offsetTop ;
The menu get's positioned at the very top of the site - really annoying. On FireFox it works good. If I put this script part at
the very end of the body, it works, too. "offsetTop" is calculated in regards of the offsetParent, a
container element. Your problem may be related to your setting styles for one
of this container element after reading the offsetTop value (check any absolute-positioned elements). In that case, browsers'
implementation could take the change into account quite differently.
Could you post some lines demonstrating the issue?
I use a slightly changed version of this: http://www.bmchebbi.addr.com/advancedmenunotes.htm
Can you help? Also, Can you tell me hot to "move" the menu (e.g. after
a window.onresize )? I think I have to modify the DIVs positions, but I
don't know how to loop through all of them. That's a bit my problem.
I'm a C++ coder and JavaScript is so... well... "ambigious" . Things
like:
var couldbeanyting [];
anyvar['Somewhere']...
and then 'Anystring'.Som eOtherFunction and 'this.' is really strange
to me...
-Gernot This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Markus Fischer |
last post by:
Hi,
I'm experiencing a wierd problem with IE 6 in Windows with two
_slightly_ different Version.
Give the following HTMl-Code, ideally the output of offsetTop should be
"105"; a few pixel plus minus would still be ok, whyever.
I've tested this successfully on 6.0.2800.1106 on a german W2KPro
machine, also with 6.0.2800.1106 on a german XPPro machine.
|
by: Pf |
last post by:
A piece of html code:
<table>
<tr>
<td>
<input type="text" name="myInput" onclick="myFunction(this)">
<td>
</tr>
</table>
|
by: Francisco |
last post by:
Hi all,
I have a div (divI) inner another div (divM), when i request the
offsetTop of divI (inner) it returns me the top of divI in divM and not
the top of divI in the document? Have anyway to get this information?
Gratefull
Francisco
|
by: tshad |
last post by:
I have been working with setting my drop boxes to allow double clicking to
select an item.
It worked fine until I made some changes. I then stripped the page down to
the bare essentials to find out why it quit working. I found that if I
didn't have a linkbutton, it quit working?????????
If I changed the linkbutton to a regular button, it quit working.
Here is the page:
|
by: MSDNAndi |
last post by:
Hi,
I have a set of simple webservices calls that worked fine using .NET
Framework 1.0.
I am calling a Java/Apache based webservices, the calling side is not able
to supply a proper WSDL.
What it does is to call a webservice with two parameters, one being a
integer, the other one being a "String" which contains XML (not the best
practice, however that is the target interface and we cannot change that).
| |
by: Tarik Monem |
last post by:
OK, you guys have helped me when I couldn't help myself, well I could but I couldn't if you know what I mean.
So, here's another that I'm having issues with for just Safari -- tested in Firefox & Opera & IE (mac -- yeah -- I still test IE5 on mac -- things are not perfectly aligned but the functionality works) -- why wouldn't it work in Safari (beta 3)
Basically the function below is called when a onclick is clicked -- Now, it moves the...
|
by: rohitchawla |
last post by:
have a problem with this code when working in IE
it gives me 0,0 coords when i use iframe tag but gives correct coords when using firefox
function GetRealOffset(id)
{
var elem = document.getElementById(id);
var leftOffset = elem.offsetLeft;
var topOffset = elem.offsetTop;
var parent = elem.offsetParent;
|
by: tromton |
last post by:
Hello all,
I have a problem with a scrript in safari 3. in mozilla/firefox and opera the problem does not exist.
what i try to do: I have a div element with overflow:auto. in the element i have several anchors, wich i can scroll to with several anchor links. this works quite nicely.
the div content can be scrolled by a JS-scrolling script. when i click on a anchor link the scrolling script loses its position, so the next time i will...
|
by: pragathik |
last post by:
hi,
i have a problem with document.body.offsetTop and document.body.offsetLeft always returns null in my code in IE6.
how can I get the values???? please suggest
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |