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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Add a Scroller to existing script

    Hi guys, I'm wondering/hoping if somebody can maybe help me. I have an existing script that will show a teams name when you mouse over each of their logo's, and if no logo is chosen , its showing the sites name.

    What I'd like to do is alter it a little bit so that instead of just showing the sites name, to have a text scroller in there. Can anybody help with that? This is what the code looks like that I have.

    Code:
    var teamPixMenu = "";
    teamPixMenu += "<div id=\"teammenu\">";
       teamPixMenu += "<table cellspacing=\"0\">";
       	teamPixMenu += "<tr>";
       		teamPixMenu += "<td><a href=\"../reports/clubhouse.php\"><img src=\"http://www.eglzfan.com/logffl/images/menu-AD-bw.GIF\" alt=\"Anniston Dragons Clubhouse\" name=\"link_1\" onmouseover=\"document.link_1.src='http://www.eglzfan.com/logffl/images/menu-AD.GIF'; document.getElementById('leaguename').style.display='none'; document.getElementById('Team_1').style.display='block'\" onmouseout=\"document.link_1.src='http://www.eglzfan.com/logffl/images/menu-AD-bw.GIF'; document.getElementById('leaguename').style.display='block'; document.getElementById('Team_1').style.display='none'\"></a></td>";
       		teamPixMenu += "<td><a href=\"../reports/clubhouse.php\"><img src=\"http://www.eglzfan.com/logffl/images/menu-BDM-bw.GIF\" alt=\"Buckass Dancing Mules Clubhouse\" name=\"link_2\" onmouseover=\"document.link_2.src='http://www.eglzfan.com/logffl/images/menu-BDM.GIF'; document.getElementById('leaguename').style.display='none'; document.getElementById('Team_2').style.display='block'\" onmouseout=\"document.link_2.src='http://www.eglzfan.com/logffl/images/menu-BDM-bw.GIF'; document.getElementById('leaguename').style.display='block'; document.getElementById('Team_2').style.display='none'\"></a></td>";
       		teamPixMenu += "<td><a href=\"../reports/clubhouse.php\"><img src=\"http://www.eglzfan.com/logffl/images/menu-IHL-bw.GIF\" alt=\"Iranian Horse-Lords Clubhouse\" name=\"link_3\" onmouseover=\"document.link_3.src='http://www.eglzfan.com/logffl/images/menu-IHL.GIF'; document.getElementById('leaguename').style.display='none'; document.getElementById('Team_3').style.display='block'\" onmouseout=\"document.link_3.src='http://www.eglzfan.com/logffl/images/menu-IHL-bw.GIF'; document.getElementById('leaguename').style.display='block'; document.getElementById('Team_3').style.display='none'\"></a></td>";
       		teamPixMenu += "<td><a href=\"../reports/clubhouse.php\"><img src=\"http://www.eglzfan.com/logffl/images/menu-LUM-bw.GIF\" alt=\"Sendero Luminoso Clubhouse\" name=\"link_4\" onmouseover=\"document.link_4.src='http://www.eglzfan.com/logffl/images/menu-LUM.GIF'; document.getElementById('leaguename').style.display='none'; document.getElementById('Team_4').style.display='block'\" onmouseout=\"document.link_4.src='http://www.eglzfan.com/logffl/images/menu-LUM-bw.GIF'; document.getElementById('leaguename').style.display='block'; document.getElementById('Team_4').style.display='none'\"></a></td>";
       		teamPixMenu += "<td><a href=\"../reports/clubhouse.php\"><img src=\"http://www.eglzfan.com/logffl/images/menu-LUM-bw.GIF\" alt=\"Sendero Luminoso Clubhouse\" name=\"link_5\" onmouseover=\"document.link_5.src='http://www.eglzfan.com/logffl/images/menu-LUM.GIF'; document.getElementById('leaguename').style.display='none'; document.getElementById('Team_5').style.display='block'\" onmouseout=\"document.link_5.src='http://www.eglzfan.com/logffl/images/menu-LUM-bw.GIF'; document.getElementById('leaguename').style.display='block'; document.getElementById('Team_5').style.display='none'\"></a></td>";
       		teamPixMenu += "<td><a href=\"../reports/clubhouse.php\"><img src=\"http://www.eglzfan.com/logffl/images/menu-LUM-bw.GIF\" alt=\"Sendero Luminoso Clubhouse\" name=\"link_6\" onmouseover=\"document.link_6.src='http://www.eglzfan.com/logffl/images/menu-LUM.GIF'; document.getElementById('leaguename').style.display='none'; document.getElementById('Team_6').style.display='block'\" onmouseout=\"document.link_6.src='http://www.eglzfan.com/logffl/images/menu-LUM-bw.GIF'; document.getElementById('leaguename').style.display='block'; document.getElementById('Team_6').style.display='none'\"></a></td>";
       	teamPixMenu += "</tr>";
       	teamPixMenu += "<tr>";
       		teamPixMenu += "<td id=\"teammenutext\" colspan=\"6\">";
                teamPixMenu += "<div id=\"leaguename\" class=\"teammenutext\"><a href=\"http://www.testsite.com/ffl/reports/index.htm\">Fantasy Sports.org - The Best in the Business..</a></div>";
                teamPixMenu += "<div id=\"Team_1\"  class=\"teammenutext\">Team 1</div>";
                teamPixMenu += "<div id=\"Team_2\" class=\"teammenutext\">Team 2</div>";
                teamPixMenu += "<div id=\"Team_3\" class=\"teammenutext\">Team 3</div>";
                teamPixMenu += "<div id=\"Team_4\" class=\"teammenutext\">Team 4</div>";
                teamPixMenu += "<div id=\"Team_5\" class=\"teammenutext\">Team 5</div>";
                teamPixMenu += "<div id=\"Team_6\" class=\"teammenutext\">Team 6</div>";
                teamPixMenu += "<div id=\"Team_7\" class=\"teammenutext\">Team 7</div>";
                teamPixMenu += "<div id=\"Team_8\"  class=\"teammenutext\">Team 8</div>";
                teamPixMenu += "<div id=\"Team_9\"  class=\"teammenutext\">Team 9</div>";
                teamPixMenu += "<div id=\"Team_10\"  class=\"teammenutext\">Team 10</div>";
                teamPixMenu += "<div id=\"Team_11\"  class=\"teammenutext\">Team 11</div>";
                teamPixMenu += "<div id=\"Team_12\"  class=\"teammenutext\">Team 12</div>";
             teamPixMenu += "</td>";
       	teamPixMenu += "</tr>";
       	teamPixMenu += "<tr>";
       		teamPixMenu += "<td><a href=\"../reports/clubhouse.php\"><img src=\"http://www.eglzfan.com/logffl/images/menu-NRC-bw.GIF\" alt=\"New Orleans Ragin Cajuns Clubhouse\" name=\"link_7\" onmouseover=\"document.link_7.src='http://www.eglzfan.com/logffl/images/menu-NRC.GIF'; document.getElementById('leaguename').style.display='none'; document.getElementById('Team_7').style.display='block'\" onmouseout=\"document.link_7.src='http://www.eglzfan.com/logffl/images/menu-NRC-bw.GIF'; document.getElementById('leaguename').style.display='block'; document.getElementById('Team_7').style.display='none'\"></a></td>";
       		teamPixMenu += "<td><a href=\"../reports/clubhouse.php\"><img src=\"http://www.eglzfan.com/logffl/images/menu-SML-bw.GIF\" alt=\"Sewanee Mountain Lions Clubhouse\" name=\"link_8\" onmouseover=\"document.link_8.src='http://www.eglzfan.com/logffl/images/menu-SML.GIF'; document.getElementById('leaguename').style.display='none'; document.getElementById('Team_8').style.display='block'\" onmouseout=\"document.link_8.src='http://www.eglzfan.com/logffl/images/menu-SML-bw.GIF'; document.getElementById('leaguename').style.display='block'; document.getElementById('Team_8').style.display='none'\"></a></td>";
       		teamPixMenu += "<td><a href=\"../reports/clubhouse.php\"><img src=\"http://www.eglzfan.com/logffl/images/menu-TCF-bw.GIF\" alt=\"Tuscaloosa Crimson Flames Clubhouse\" name=\"link_9\" onmouseover=\"document.link_9.src='http://www.eglzfan.com/logffl/images/menu-TCF.GIF'; document.getElementById('leaguename').style.display='none'; document.getElementById('Team_9').style.display='block'\" onmouseout=\"document.link_9.src='http://www.eglzfan.com/logffl/images/menu-TCF-bw.GIF'; document.getElementById('leaguename').style.display='block'; document.getElementById('Team_9').style.display='none'\"></a></td>";
       		teamPixMenu += "<td><a href=\"../reports/clubhouse.php\"><img src=\"http://www.eglzfan.com/logffl/images/menu-WC-bw.GIF\" alt=\"White Canes Clubhouse\" name=\"link_10\" onmouseover=\"document.link_10.src='http://www.eglzfan.com/logffl/images/menu-WC.GIF'; document.getElementById('leaguename').style.display='none'; document.getElementById('Team_10').style.display='block'\" onmouseout=\"document.link_10.src='http://www.eglzfan.com/logffl/images/menu-WC-bw.GIF'; document.getElementById('leaguename').style.display='block'; document.getElementById('Team_10').style.display='none'\"></a></td>";
       		teamPixMenu += "<td><a href=\"../reports/clubhouse.php\"><img src=\"http://www.eglzfan.com/logffl/images/menu-WC-bw.GIF\" alt=\"White Canes Clubhouse\" name=\"link_11\" onmouseover=\"document.link_11.src='http://www.eglzfan.com/logffl/images/menu-WC.GIF'; document.getElementById('leaguename').style.display='none'; document.getElementById('Team_11').style.display='block'\" onmouseout=\"document.link_11.src='http://www.eglzfan.com/logffl/images/menu-WC-bw.GIF'; document.getElementById('leaguename').style.display='block'; document.getElementById('Team_11').style.display='none'\"></a></td>";
       		teamPixMenu += "<td><a href=\"../reports/clubhouse.php\"><img src=\"http://www.eglzfan.com/logffl/images/menu-WC-bw.GIF\" alt=\"White Canes Clubhouse\" name=\"link_12\" onmouseover=\"document.link_12.src='http://www.eglzfan.com/logffl/images/menu-WC.GIF'; document.getElementById('leaguename').style.display='none'; document.getElementById('Team_12').style.display='block'\" onmouseout=\"document.link_12.src='http://www.eglzfan.com/logffl/images/menu-WC-bw.GIF'; document.getElementById('leaguename').style.display='block'; document.getElementById('Team_12').style.display='none'\"></a></td>";
       	teamPixMenu += "</tr>";
       teamPixMenu += "</table>";
    teamPixMenu += "</div>";
    document.write(teamPixMenu);

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well you're using a table, and I don't think you can include a scroll bar in a table cell (which is what I think you're trying to do..).

    You'll have to incorporate an iFrame somehow.

    Or are you wanting to incorporate a script that scrolls some text (like this? or this?)?

    Well there's some code for it, and I'd almost help you but I don't know where you want it.. "instead of just showing the sites name, to have a text scroller in there", I don't know what "sites" you mean..

    Hope that helps,
    Sadiq.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for getting back to me. I'm glad you were able to decipher what I'm was getting. I basically want to take a text scroller like your showing your first example, and to place it where the site/league name is showing, which is line 14 of the current script here:

    Code:
    teamPixMenu += "<div id=\"leaguename\" class=\"teammenutext\"><a href=\"http://www.testsite.com/ffl/reports/index.htm\">Fantasy Sports.org - The Best in the Business..</a></div>";
    I'd give a link to it, but I havent' setup the webhost provider yet for it to begin moving it all across.


  •  

    Posting Permissions

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