Results 1 to 6 of 6

Thread: I new to this

  1. #1
    Join Date
    Sep 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default I new to this

    http://www.dynamicdrive.com/dynamicindex11/scrollc.htm

    I'm tring to add "scrollable content" from the "dynamic content". The problem is the fact I don't know how to move the box to a different area of the page because it's in the top left corner. I know how to change the size and color.

  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

    Just put the code wherever you want the Scrollable content to appear in the body of your page. A frequent mistake is putting the code in the head of the page.
    - John
    ________________________

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

  3. #3
    Join Date
    Sep 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I still need help, somebody please copy and paste the code exactly where it would go in a html document

  4. #4
    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

    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    </head>
    <body>
    <p> Hey look! The scroller is <b>below</b> me because that is where it is in the <b>body</b>.</p>
    <ilayer name="scroll1" width=170 height=150 clip="0,0,170,150">
    <layer name="scroll2" width=170 height=150 bgColor="lightyellow">
    <div id="scroll3" style="width:170px;height:150px;background-color:lightyellow;overflow:auto">
    <big>T</big>his is a cool script that allows you to compact any content and confine it within a scrollable mini "window" Save valuable document space while making your page more "interactive", all at the same time! This script uses two different techniques- one for IE, one for NS- to create the scrollable window. Scrollbars will be available to IE 4 users to scroll the window, while NS users will need to use the "up" and "down" buttons instead (since NS does not support the adding of scrollbars to contents). 
    </div>
    </layer>
    </ilayer>
    
    <script>
    
    /***********************************************
    * Scrollable content Script-  Dynamic Drive (www.dynamicdrive.com)
    * This notice must stay intact for use
    * Visit http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    var nsstyle='display:""'
    if (document.layers)
    var scrolldoc=document.scroll1.document.scroll2
    function up(){
    if (!document.layers) return
    if (scrolldoc.top<0)
    scrolldoc.top+=10
    temp2=setTimeout("up()",50)
    }
    function down(){
    if (!document.layers) return
    if (scrolldoc.top-150>=scrolldoc.document.height*-1)
    scrolldoc.top-=10
    temp=setTimeout("down()",50)
    }
    
    function clearup(){
    if (window.temp2)
    clearInterval(temp2)
    }
    
    function cleardown(){
    if (window.temp)
    clearInterval(temp)
    }
    
    </script>
    <br><span style="display:none" style=&{nsstyle};><a href="#" onMousedown="up()"
    onMouseup="clearup()" onClick="return false" onMouseout="clearup()">Up</a> | <a href="#"
    onMousedown="down()" onMouseup="cleardown()" onClick="return false"
    onMouseout="cleardown()">Down</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=0;return false">Top</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=scrolldoc.document.height*(-1)+150;return false">Bottom</a></span>
    <p> Hey look! The scroller is <b>above</b> me because that is where it is in the <b>body</b>.</p>
    </body>
    </html>
    - John
    ________________________

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

  5. #5
    Join Date
    Sep 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    that's what I did and I still keeps staying at the top left of the page how do I change the location on the page?

  6. #6
    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

    Can't make it any simpler than that. Copy and paste the above (my last post) into a text editor and save as test.htm and view it in the browser. You will see that the first paragraph is above the scroller and that the second paragraph is below it. You can put the scroller inside a table if you like, or in a division (<div></div>), anywhere. If you know how to place other items, like images for example, on a page using a text editor - then just treat the entire script and its markup as though it is an image tag.
    - 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
  •