Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Bookmark script for lengthy pages

    Hi, I'm making a website that has many pages that are very lengthy and I was wondering if there is any sort of script to sort of bookmark where you are in a page using cookies in case the visitors to the site want to take a break from reading and come back at another point and continue where they left off.

    I've seen scripts where you can click a link to zoom down to another spot in the page, and I've seen scripts that puts an object in the lower or upper corner of a page so that it stays there even when you scroll, I was hoping for something like that... The user can read away and click a "Bookmark" button on that object if they need to take a break from reading.

    Thanks so much for any help anyone can give me!

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Trim those pages

    You didn't provide a link so I'm guessing here, but it sounds like a better idea to divide up those lengthy pages into an suitable number of shorter ones.
    Although for certain purposes like references and manuals, pages longer than average (two to three times the window height) are acceptable, they shouldn't get so long that visitors lose their orientation on them.
    Better cut them up into more managable size pages and provide a sort of index to easily navigate through them.
    Visitors are likely to remember which page they were visiting last if each is titled clearly, and the smaller size should pose no real problems in finding back the point where they left off by scrolling up and down a bit.

    A usable example of articles divided up as described can be found on Webmonkey, like this one on Ruby on Rails.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #3
    Registered User
    Join Date
    Oct 2004
    Posts
    592
    Thanks
    0
    Thanked 1 Time in 1 Post
    As a web design tips goes as, a web page shouldn't be lengthy and should be sub divided into parts or sections according to the content. If it was lengthy, then visitors will lose their ways in reading down the page, causing desire to unwilling to go on.

    In addition, the bookmarks script only works in MSIE with just clicking, and in other browsers , you need to press Ctrl+D or their assign bookmarker key.

    Download it here :

    http://icebergz.flashband.net/myitlibrary/catalog/webdev/do'n'don't-webdesign.zip

  • #4
    Regular Coder
    Join Date
    Nov 2004
    Location
    The Netherlands
    Posts
    551
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You could do something with cookies, and, uhhh, what was it again, body.offsetheight to determine the scrollbar?
    CATdude about IE6: "All your box-model are belong to us"

  • #5
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, the visitors *want* them to be lengthy. They are stories and fanfics submitted by the visitors. They have the option of downloading the story as either a text file (which I prefer for this reason, when reading long text files I type "=-=" as my "bookmark" then later go to Edit->Find... and search for "=-=" and boom, I'm there. They're also sometimes available in MS Word if there is formatting that would make it more suitable for that. But, some people want to view it as a long HTML file so that they don't have to download anything. I could chop these files up into multiple html files, especially since many have chapters, but that would make it a heck of a lot more hassle for me because as it is now, I handle thousands of files to upload (and one at a time because of my host, and I must use it because it has no maximum bandwidth transfer) But if I chopped it like that, then it would be a matter millions of files.

    As for this "body.offsetheight to determine the scrollbar", could you expand or give a link to show how to use that stuff? I don't know much about andvanced coding to do stuff like this, and don't even know what that is referring to.

  • #6
    Registered User
    Join Date
    Oct 2004
    Posts
    592
    Thanks
    0
    Thanked 1 Time in 1 Post
    Code:
    
    <html>
      <head>
        <title>Fun Scroll</title>
        <style type="text/css">
          #divTest{width:150px;height:200px;overflow:auto}
        </style>
        <script type="text/javascript">
          window.onload = function(){
            var strCook = document.cookie;
            if(strCook.indexOf("!~")!=0){
              var intS = strCook.indexOf("!~");
              var intE = strCook.indexOf("~!");
              var strPos = strCook.substring(intS+2,intE);
              document.getElementById("divTest").scrollTop = strPos;
            }
          }
          function SetDivPosition(){
            var intY = document.getElementById("divTest").scrollTop;
            document.title = intY;
            document.cookie = "yPos=!~" + intY + "~!";
          }
        </script>
      </head>
      <body>
        <div id="divTest" onscroll="SetDivPosition()">
          1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>
          1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>
          1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>
          1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>
          ERIC<br/>
          1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>
          1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>
          1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>
          1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>1<br/>
        </div>
      </body>
    </html>
    Is this works ?


  •  

    Posting Permissions

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