Results 1 to 3 of 3

Thread: Right script..wrong place?

  1. #1
    Join Date
    Nov 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Right script..wrong place?

    Hello Everyone,

    I have a script that I'm using Mike's DHTML scroller in my page from:
    http://www.dynamicdrive.com/dynamici...mikescroll.htm

    and it works great BUT not in the right spot in my page. It always shows in the top of bottom, never in the middle? My code is in the link below, any ideas because I've run out of my own.

    http://www.kandbcoffeesbean.com/Varietals.html

    Thank you in advance!!!!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,070
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    First off it is a wonder the script works at all. It doesn't in FF, and it is supposed to. Anyways, you have two body tags on your page. A big no no. You also have two separate onload events, another no no. To fix these, change the first body tag, that now looks like so:

    HTML Code:
    </HEAD>
    <body>
    <div id="tempholder"></div>
    to this:

    HTML Code:
    </head>
    <body bgcolor="black" onload="CSScriptInit();runmikescroll();">
    <div id="tempholder"></div>
    Remove this line from Mike's DHTML scroller script (the part on the page, thankfully):

    Code:
    window.onload=runmikescroll
    And remove this other body and associated erroneous tags completely:

    HTML Code:
    </body>
    </html>
    
    
    <BODY BGCOLOR=BLACK ONLOAD="CSScriptInit();">
    Now we are ready to go to work on your question. Find this line (it is just above where that last bit we removed was, and just after the script):

    HTML Code:
    <div id="placeholder" style="position:relative; width:420px; height:32px;"> </div>
    Change it to this:

    HTML Code:
    <center><div id="placeholder" style="position:relative; width:420px; height:32px;top:30px;"> </div></center>
    Notice the top:30px; part I added, that gets the scroller into a better position vertically, I think. The higher this number, the lower down the page the scroller will appear.
    - John
    ________________________

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

  3. #3
    Join Date
    Nov 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thank You!

    John,

    Thank you for taking the time to answer my question, I really appreciate it! It worked great! Keep up the great work, novices like myself really appreciate the extra time to kinda explain where they went wrong.

    Many Thanks John!!

    Brian

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
  •