Results 1 to 6 of 6

Thread: Don't know 'how to' get it right . . .

  1. #1
    Join Date
    Jul 2012
    Location
    St. Elmo, IL
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Don't know 'how to' get it right . . .

    1) CODE TITLE: I think it's Marquee Script-�

    2) AUTHOR NAME/NOTES: Dynamic Drive as far as I know

    3) DESCRIPTION: Newsscroller

    4) URL TO CODE: http://www.midwestrugby.org/08sevens...andlodging.htm

    or, ATTACHED BELOW (see #3 in guidelines below): I can't figure out where to go to get the instructions on 'how to' put the code in the page correctly, 'cause right now the page scrolls way to far to the right . . . any help will be greatly appreciated . . .

    Code:
    <p align="center"><tr>
    <td>
    <P 
          style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2px; TEXT-INDENT: 2px"><b><FONT style="FONT-SIZE: 36pt" face="High Speed">
          <SCRIPT language=JavaScript1.2>
    
    /*
    Cross browser Marquee script- � Dynamic Drive (www.dynamicdrive.com)
    For full source code, 100's more DHTML scripts, and Terms Of Use, visit http://www.dynamicdrive.com
    Credit MUST stay intact
    */
    
    //Specify the newsscroller's width (in pixels)
    var newsscrollerwidth=910 pixels
    //Specify the newsscroller's height
    var newsscrollerheight=58
    //Specify the newsscroller's newsscroller speed (larger is faster 1-10)
    var newsscrollerspeed=6
    //configure background color:
    var newsscrollerbgcolor="#000000"
    //Pause newsscroller onMousever (0=no. 1=yes)?
    var pauseit=1
    
    //Specify the newsscroller's content (don't delete <nobr> tag)
    //Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
    
    var newsscrollercontent='<nobr><font class="newstitle"><font color="#FFFFFF"><FONT style="FONT-SIZE: 36pt" face="High Speed"><b>The Iowa City Ducks Rugby Club proudly presents their Ducks 7s Rugby Tournament</a>&nbsp; &nbsp; - &nbsp; &nbsp;<font color="#FFFFFF">Rugby all day at the University of Iowa Rugby Grounds</a>&nbsp; &nbsp; - &nbsp; &nbsp;<font color="#FFFFFF">The Magic Bus</a>&nbsp; &nbsp; - &nbsp; &nbsp;<font color="#FFFFFF">Join us</a>&nbsp; &nbsp; - &nbsp; &nbsp;<font color="#FFFFFF">Let the Good Times Roll</font></nobr>'
    
    
    ////NO NEED TO EDIT BELOW THIS LINE////////////
    newsscrollerspeed=(document.all)? newsscrollerspeed : Math.max(1, newsscrollerspeed-1) //slow speed down by 1 for NS
    var copyspeed=newsscrollerspeed
    var pausespeed=(pauseit==0)? copyspeed: 0
    var iedom=document.all||document.getElementById
    if (iedom)
    document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100;left:-4000">'+newsscrollercontent+'</span>')
    var actualwidth=''
    var cross_newsscroller, ns_newsscroller
    
    function populate(){
    if (iedom){
    cross_newsscroller=document.getElementById? document.getElementById("ienewsscroller") : document.all.ienewsscroller
    cross_newsscroller.style.left=newsscrollerwidth+4
    cross_newsscroller.innerHTML=newsscrollercontent
    actualwidth=document.all? cross_newsscroller.offsetWidth : document.getElementById("temp").offsetWidth
    }
    else if (document.layers){
    ns_newsscroller=document.ns_newsscroller.document.ns_newsscroller2
    ns_newsscroller.left=newsscrollerwidth+8
    ns_newsscroller.document.write(newsscrollercontent)
    ns_newsscroller.document.close()
    actualwidth=ns_newsscroller.document.width
    }
    lefttime=setInterval("scrollnewsscroller()",20)
    }
    window.onload=populate
    
    function scrollnewsscroller(){
    if (iedom){
    if (parseInt(cross_newsscroller.style.left)>(actualwidth*(-1)+8))
    cross_newsscroller.style.left=parseInt(cross_newsscroller.style.left)-copyspeed
    else
    cross_newsscroller.style.left=newsscrollerwidth+8
    
    }
    else if (document.layers){
    if (ns_newsscroller.left>(actualwidth*(-1)+8))
    ns_newsscroller.left-=copyspeed
    else
    ns_newsscroller.left=newsscrollerwidth+8
    }
    }
    
    if (iedom||document.layers){
    with (document){
    document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
    if (iedom){
    write('<div style="position:relative;width:'+newsscrollerwidth+';height:'+newsscrollerheight+';overflow:hidden">')
    write('<div style="position:absolute;width:'+newsscrollerwidth+';height:'+newsscrollerheight+';background-color:'+newsscrollerbgcolor+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=newsscrollerspeed">')
    write('<div id="ienewsscroller" style="position:absolute;left:0;top:0"></div>')
    write('</div></div>')
    }
    else if (document.layers){
    write('<ilayer width='+newsscrollerwidth+' height='+newsscrollerheight+' name="ns_newsscroller" bgColor='+newsscrollerbgcolor+'>')
    write('<layer name="ns_newsscroller2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=newsscrollerspeed"></layer>')
    write('</ilayer>')
    }
    document.write('</td></table>')
    }
    }
    </SCRIPT>
    </NOBR></SPAN></P></td>
    </tr>
    Cheers,
    Shawn
    Last edited by jscheuer1; 07-04-2012 at 02:59 AM. Reason: Format

  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

    That's not an official Dynamic Drive script. But it looks like it was modified from one:

    http://www.dynamicdrive.com/dynamicindex2/cmarquee.htm

    Anyways, get rid of this (from your page's source code):

    Code:
          <FONT 
          class=newstitle>
          <SPAN id=temp 
          style="LEFT: -200px; VISIBILITY: hidden; POSITION: absolute; TOP: -100px"><NOBR>Benefit Auction</a>&nbsp; &nbsp; - &nbsp; &nbsp;<font color="#FFFFFF">Autographed Guitar from STYX</a>&nbsp; &nbsp; - &nbsp; &nbsp;Items from Local Sports Celebrities</a>&nbsp; &nbsp; - &nbsp; &nbsp;Live Music from Hyper fuzz</a>&nbsp; &nbsp; - &nbsp; &nbsp;Rugby all day at the University of Iowa</a>&nbsp; &nbsp; - &nbsp; &nbsp;The Magic Bus</a>&nbsp; &nbsp; - &nbsp; &nbsp;Volleyball</a>&nbsp; &nbsp; - &nbsp; &nbsp;Bar Oympics and much more</a>&nbsp; &nbsp; - &nbsp; &nbsp;Join us</a>&nbsp; &nbsp; - &nbsp; &nbsp;Let the Good Times Roll</A></NOBR></SPAN></P>
    Change the highlighted as shown (add the red 0) in the script:

    Code:
     . . . rollerbgcolor="#000000"
    //Pause newsscroller onMousever (0=no. 1=yes)?
    var pauseit=1
    
    //Specify the newsscroller's content (don't delete <nobr> tag)
    //Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
    
    var newsscrollercontent='<nobr><font class="newstitle"><font color="#FFFFFF"><FONT style="FONT-SIZE: 36pt" face="High Speed"><b>Benefit Auction</a>&nbsp; &nbsp; - &nbsp; &nbsp;<font color="#FFFFFF">Autographed Guitar from STYX</a>&nbsp; &nbsp; - &nbsp; &nbsp;<font color="#FFFFFF">Items from Local Sports Celebrities</a>&nbsp; &nbsp; - &nbsp; &nbsp;<font color="#FFFFFF">Live Music from Hyper fuzz</a>&nbsp; &nbsp; - &nbsp; &nbsp;<font color="#FFFFFF">Rugby all day at the University of Iowa</a>&nbsp; &nbsp; - &nbsp; &nbsp;<font color="#FFFFFF">The Magic Bus</a>&nbsp; &nbsp; - &nbsp; &nbsp;<font color="#FFFFFF">Volleyball</a>&nbsp; &nbsp; - &nbsp; &nbsp;<font color="#FFFFFF">Bar Oympics and much more</a>&nbsp; &nbsp; - &nbsp; &nbsp;<font color="#FFFFFF">Join us</a>&nbsp; &nbsp; - &nbsp; &nbsp;<font color="#FFFFFF">Let the Good Times Roll</font></nobr>'
    
    
    ////NO NEED TO EDIT BELOW THIS LINE////////////
    newsscrollerspeed=(document.all)? newsscrollerspeed : Math.max(1, newsscrollerspeed-1) //slow speed down by 1 for NS
    var copyspeed=newsscrollerspeed
    var pausespeed=(pauseit==0)? copyspeed: 0
    var iedom=document.all||document.getElementById
    if (iedom)
    document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100;left:-40000">'+newsscrollercontent+'</span>')
    var actualwidth=''
    var cross_newsscroller, ns_new . . .
    That's it!
    - John
    ________________________

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

  3. #3
    Join Date
    Jul 2012
    Location
    St. Elmo, IL
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thanks a ton . . .

    Thank you very much . . . not time left to work on it tonight, but I'll let you know tomorrow if it worked for me.

    Have a great 4th of July.

    Cheers,
    Shawn

  4. #4
    Join Date
    Jul 2012
    Location
    St. Elmo, IL
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Bernie - 1227:

    You are correct, it is in a Table cell right now, http://www.midwestrugby.org/08sevens...andlodging.htm. I've been playing 'round and discovered it works just fine IF I keep it out of a Table. If you've got a way to put the 'marquee' newsscroller in a Table, and/or cell please let me know. I will go in and change everything so that it is by itself IF there's no other way. I didn't know that 'cause I don't have much education in Java Script. The newsscroller is about a third of the way down the page, just below the 'Speakeasy' and the Fox 100.7 radio station banner. Was pulling my hair out until I put the newsscroll all by itself.

    Thanks for pointing that information out, and I'll be changing it later today . . . it's already 2:05 AM and I need to hit the hey, as they say.

    Cheers,
    Shawn

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

    Being in a table doesn't matter, as long as you make the changes as outlined in my previous post, it will be fine.
    - John
    ________________________

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

  6. #6
    Join Date
    Jul 2012
    Location
    St. Elmo, IL
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    John:

    Will do that later today to see if I 'get it'! Already made the changes to another page I'm working on for another Rugby 7s Tournament in the Midwest, and it came out GREAT. Thanks for your help.


    Cheers,
    Shawn

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
  •