Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    Im having problems getting this to work in Moz
    Code:
    function submenu(smname, distance, state) {
    	obj = document.getElementById('navstart');
    	subposx = obj.offsetLeft;
    	posy = 116;
    	posx = subposx + distance;
    	if (state == 'show') {
    		clear();
    		document.getElementById(smname).style.display = 'inline';
    		document.getElementById(smname).style.top = posy + 'px';
    		document.getElementById(smname).style.left = posx + 'px';
    		document.getElementById(smname + 'cell').style.borderBottom = '0px';
    		document.getElementById(smname + 'cell').style.paddingBottom = '1px';
    	}
    btw i only posted the offending part of the code
    JR

  2.  

  3. #2
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    IE offsetLeft or offsetTop returns the value relative to the offsetParent (which is the parent that the current element is offset from in terms of position).

    NS returns the value relative to the body.

    Look at the Transio.com menu script to see how I handled IE and NS differences with offset.

  4. #3
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    i found out my pop-up menu doesn't appear at all, i think i have a problem with something else, not sure what though, would it be a problem with using the css in the javascript?

    I checked your transio nav, hope you don't mind that i stole the idea for the pause before the menu disappears
    JR


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:32 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com