Results 1 to 2 of 2

Thread: Jump to Top Link

  1. #1
    Join Date
    Dec 2004
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Jump to Top Link

    http://dynamicdrive.com/dynamicindex5/jumptop.htm

    That little script works just fine in all browsers but firefox 1.5
    the link follows allong the bottom edge like it should but when a user changes the window size the browser does not refresh.
    i have looked at it and messed around with firefox's javascript secruity settings and nothing has changed it to make it work.
    any help as to why?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well, the browser doesn't need to refresh, but it does need up to the moment information on positioning. Since the window dimensions are set for FF on page load, FF will always think the window is the same size it was when loaded. To change this, substitute this for the script's original function staticit():

    Code:
    function staticit(){ //function for IE4/ NS6
    var w2=ns6? pageXOffset+(window.innerWidth-crosslogo.offsetWidth-20) : ietruebody().scrollLeft+w
    var h2=ns6? pageYOffset+(window.innerHeight-crosslogo.offsetHeight-15) : ietruebody().scrollTop+h
    crosslogo.style.left=w2+"px"
    crosslogo.style.top=h2+"px"
    }
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •