Results 1 to 2 of 2

Thread: how can i use rollover images on this menu?

  1. #1
    Join Date
    Jun 2007
    Thanked 0 Times in 0 Posts

    Exclamation how can i use rollover images on this menu?

    i really like the menu, the thing is i have no clue to with how to alter the top text into images... and images that change when you hover the mouse pointer on it.

    here's an example:

    see how the top nav where 'team' 'news' 'tckets', etc are? i want that image changing effect. i already am creating the images. my biggest challenge now is to get that effect to work with this tab mouse over menu.

    somebody pleeeeease help me with this.!!!!!!!

    i have even included the code to make it easier for you guys to understand what im trying to do. i have 2 onMouseover events on one because i need it to do both. but it only choses one or the either. more specifically the first of whatever onMouseover command.

    --start sample code--
    <!--Links used to initiate the sub menus. Pass in the desired submenu index numbers (ie: 0, 1) -->
    <table border="1" width="35&#37;" id="table1">
    <td width="140">
    <a href="" onMouseover="showit(0)" onMouseOut="if(document.images){'';}" target="_self" onMouseOver="if(document.images){'';}">
    <img alt="" name="abc" src="" height="49" border="0" width="117"></a></td>
    <a href="" onMouseover="showit(1)">News</a></td>
    <div id="describe" style="background-color:#CCCCCC;width:383px;height:18px" onMouseover="clear_delayhide()" onMouseout="resetit(event)">
    <p align="center"></div>

    <script language="JavaScript1.2">

    Tabs Menu (mouseover)- By Dynamic Drive
    For full source code and more DHTML scripts, visit
    This credit MUST stay intact for use

    var submenu=new Array()

    //Set submenu contents. Expand as needed. For each content, make sure everything exists on ONE LINE. Otherwise, there will be JS errors.

    submenu[0]='<font size="2" face="Verdana"><b><a href="">Roster</a> | <a href="">Coaching Staff</a> | <a href="">Junior Varsity</a> | <a href="">Stats</a></b></font>'
    submenu[1]='<font size="2" face="Verdana"><b><a href="">Latest News</a> | <a href="">Archives</a></b></font>'

    //Set delay before submenu disappears after mouse moves out of it (in milliseconds)
    var delay_hide=500

    /////No need to edit beyond here

    var menuobj=document.getElementById? document.getElementById("describe") : document.all? document.all.describe : document.layers? document.dep1.document.dep2 : ""

    function showit(which){
    thecontent=(which==-1)? "" : submenu[which]
    if (document.getElementById||document.all)
    else if (document.layers){

    function resetit(e){
    if (document.all&&!menuobj.contains(e.toElement))
    else if (document.getElementById&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))

    function clear_delayhide(){
    if (window.delayhide)

    function contains_ns6(a, b) {
    while (b.parentNode)
    if ((b = b.parentNode) == a)
    return true;
    return false;

    --end sample code--
    Last edited by korndogg27; 06-11-2007 at 07:33 PM.

  2. #2
    Join Date
    Jun 2007
    Thanked 0 Times in 0 Posts


    actually i figured that out myself. (placed a semicolon). now my problem is.. when i scroll down to the selections, the image goes back to its original form.


Posting Permissions

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