Results 1 to 5 of 5

Thread: [Resolved] Floating Panel

Hybrid View

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2001
    Location
    Ottawa
    Posts
    38

    Thumbs up Re: Floating Panel ?

    I found the below code on another posting that solved my problem perfectly.

    Chris


    <!-- THREE STEPS TO INSTALL FLOATING LINK:

    1. Copy the coding into the HEAD of your HTML document
    2. Add the onLoad event handler into the BODY tag
    3. Put the last coding into the BODY of your HTML document -->

    <!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

    <HEAD>

    <SCRIPT LANGUAGE="JavaScript">
    <!-- Original: Richard Cleaver ([email protected]) -->
    <!-- Web Site: http://www.cleaver.org.uk -->

    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->

    <!-- Begin
    function floatButton () {
    if (document.all) {
    document.all.topButton.style.pixelTop = document.body.scrollTop;
    }
    else if (document.layers) {
    document.topButton.top = window.pageYOffset;
    }
    else if (document.getElementById) {
    document.getElementById('topButton').style.top = window.pageYOffset + 'px';
    }
    }
    if (document.all)
    window.onscroll = floatButton;
    else
    setInterval ('floatButton()', 100);
    function initButton () {
    if (document.all) {
    document.all.topButton.style.pixelLeft = document.body.clientWidth - document.all.topButton.offsetWidth;
    document.all.topButton.style.visibility = 'visible';
    }
    else if (document.layers) {
    document.topButton.left = window.innerWidth - document.topButton.clip.width - 15;
    document.topButton.visibility = 'show';
    }
    else if (document.getElementById) {
    document.getElementById('topButton').style.left = (window.innerWidth - 35) + 'px';
    document.getElementById('topButton').style.visibility = 'visible';
    }
    }
    // End -->
    </script>

    </HEAD>

    <!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->

    <BODY onLoad="initButton()">

    <!-- STEP THREE: Copy this code into the BODY of your HTML document -->

    <SPAN ID="topButton" STYLE="position: absolute; visibility: hidden; top: 0px;">
    <A HREF="javascript: window.scrollTo(0, 0); void 0" ONMOUSEOVER="window.status = 'top'; return true;" ONMOUSEOUT="window.status = ''; return true;">Back to Top</A>
    </SPAN>

    <p><center>
    <font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
    by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
    </center><p>

    <!-- Script Size: 2.14 KB -->

  2. #2
    Hyperactive Member tailz's Avatar
    Join Date
    Jul 2002
    Posts
    306

    Re: [Resolved] Floating Panel

    Yea thats the javascript I said you'd need to hunt down

    If you have any problems with the SPAN tag, use the DIV tag

    Glad it worked out

Posting Permissions

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



Click Here to Expand Forum to Full Width