Top to the page ; link

I have placed a link
at the bottom of my web page

which takes the user to the Top of the page

but the problem is ; it changes the window title

is there any solution to this

Comments

  • : I have placed a link
    : at the bottom of my web page
    :
    : which takes the user to the Top of the page
    :
    : but the problem is ; it changes the window title
    :
    : is there any solution to this


    This may not be not the easiest way, but...
    [code]




    function ToTopClick() {
    window.scrollTo(0)
    }
    function ToTopOver(o) {
    o.style.background='#fefea0'
    o.style.color='red'
    }
    function ToTopOut(o) {
    o.style.background='white'
    o.style.color='blue'
    }



    Back to top

    [/code]

    tburcham
  • that's working but not in reverse
    if I want to navigate from
    top to some pragraph in the middle
    what should I do

    I tried it by modifiying ur Original code but that is
    not working


    : [code]



    new

    function ToTopClick() {
    window.scrollTo(50)
    }
    function ToTopOver(o) {
    o.style.background='#fefea0'
    o.style.color='red'
    }
    function ToTopOut(o) {
    o.style.background='white'
    o.style.color='blue'
    }



    Back to top





























    Middle Text
































  • : that's working but not in reverse
    : if I want to navigate from
    : top to some pragraph in the middle
    : what should I do
    :
    : I tried it by modifiying ur Original code but that is
    : not working

    Hi Nomi49,
    I didn't know you needed that option. One way I found to simulate
    links was to use

    's with absolute positioning and then use
    "window.scrollTo(x,y)". You may need to make sure there's content to
    scroll past for this to work well. Here's an example:[code]

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

    Title

    var nav = new String( window.navigator.appName );
    nav = nav.substr(0,3);

    function PaOver(o) {

    if( nav == 'Net' ) {
    o.style.cursor="Pointer";
    } else {
    pa.style.cursor="hand";
    }
    }
    function PaOut(o) {

    if( nav == 'Net' ) {
    o.style.cursor="Arrow";
    } else {
    pa.style.cursor="default";
    }
    }

    function PaClick(spos) {
    window.scrollTo(0, spos )
    }



    Click here to scroll


    Bookmark

    [/code]

    tburcham
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories