Welcome to TalkGraphics.com
Results 1 to 9 of 9
  1. #1

    Question On Double click Return to Top of Page

    I had a javascript in my header so a user could double click to return to the top of the page. Now, with Web Designer 10 it is not working. When I preview the page it will work, but once I publish it to the Web it will not work. Any suggestions would be much appreciated. I would like to have my viewers simply double click on the website and it goes to the top of the page. Here is the script:

    <script language="JavaScript1.2">
    <!--

    function dblclick() {
    window.scrollTo(0,0)
    }
    if (document.layers) {
    document.captureEvents(Event.ONDBLCLICK);
    }
    document.ondblclick=dblclick;
    //-->
    </script>

  2. #2
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,910

    Default Re: On Double click Return to Top of Page

    Can't replicate this. It works for me in all browsers>

    TEST HERE
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  3. #3
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,499

    Default Re: On Double click Return to Top of Page

    Works for me, Egg. But how do I know to double click?

  4. #4
    Join Date
    Jan 2014
    Location
    Savannah, Georgia Area
    Posts
    309

    Default Re: On Double click Return to Top of Page

    Didn't you read the title of this post Gary?

    O and the double click is working here as well.

  5. #5
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,910

    Default Re: On Double click Return to Top of Page

    I think Gary's point is how would a visitor know that double clicking returns the page to the top. It's hardly standard practice.
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  6. #6
    Join Date
    Jan 2014
    Location
    Savannah, Georgia Area
    Posts
    309

    Default Re: On Double click Return to Top of Page

    I understand... I was only kidding.

    It would have to be mentioned somewhere on the website of course.

  7. #7
    Join Date
    Sep 2000
    Location
    Bracknell, UK
    Posts
    8,659

    Default Re: On Double click Return to Top of Page

    Quote Originally Posted by Egg Bramhill View Post
    I think Gary's point is how would a visitor know that double clicking returns the page to the top. It's hardly standard practice.
    Yes, mentioned or not, I don't think it's a good practice.

  8. #8
    Join Date
    Nov 2006
    Posts
    1,602

    Default Re: On Double click Return to Top of Page

    Like Paul said,not good practice and like Gary said,how to know
    So,if you want to warn people about the feature you could do it like other sites have,
    and simply put a floating Arrow on your page which should be enough indication to click and go to top

    Hans

  9. #9
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,499

    Default Re: On Double click Return to Top of Page

    OTOH klowetx may have just been experimenting with the code placeholder and wondering why it did not work.

    Didn't you read the title of this post Gary?
    Who reads? I post first and read later.

 

 

Tags for this Thread

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
  •