Results 1 to 6 of 6

Thread: Tabs Menu

  1. #1
    Join Date
    Feb 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Tabs Menu

    Hello

    I am using this script.

    http://www.dynamicdrive.com/dynamici...bmouseover.htm

    I changed the code from :
    Code:
    <!--Links used to initiate the sub menus. Pass in the desired submenu index numbers (ie: 0, 1) -->
    <a href="http://www.javascriptkit.com" onMouseover="showit(0)">JavaScript Kit</a> | <a href="http://freewarejava.com" onMouseover="showit(1)">Freewarejava</a><br>
    to:
    Code:
    <!--Links used to initiate the sub menus. Pass in the desired submenu index numbers (ie: 0, 1) -->
    <a href="http://www.javascriptkit.com" onClick="showit(0)">JavaScript Kit</a> | <a href="http://freewarejava.com" onMouseover="showit(1)">Freewarejava</a><br>
    When i test it (with onClick) on Firefox (1.5) it works perfectly..But when i test it on Internet Explorer (6.0) it doesn't work at all..

    Is this normal?? How can i use it??

    Thank you.

  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

    HTML Code:
    <a href="http://www.javascriptkit.com" onclick="showit(0);return false;">JavaScript Kit</a> | <a href="http://freewarejava.com" onclick="showit(1);return false;">Freewarejava</a><br>
    The above works here in IE6, I'm surprised it worked in FF the other way.
    - John
    ________________________

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

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

    Default

    wow it works ^^ thanks alot

    And another question..On the OnLoad event i want the page to laod a selected menu..Anyway this works in FireFox but not in Internet Explorer..I tired putting the "return false;" to it as well to see if it work but nothing happened..

    Can you help me??

    Code:
    <body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onLoad="showit(2);setVariables();checkLocation();">
    "setVariables();checkLocation();" are 2 other funcions i test..

    Thank you.

  4. #4
    Join Date
    Feb 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    mmm well i have a problem.. ven though i said it worked before..
    When i put the "return false;" the script below (my menu) doesn't work..It doesn't take me to the location i need..

    Code:
    <!-- lINKS -->
    <td width="13%" height="25"><a href="../Home/home.html" onClick="showit(0);" style="text-decoration:none;"><span class="Menu1Title">Home</span></a></td>
    <td width="14%" height="25"><a href="../Servizi/servizi.html" onClick="showit(1);" style="text-decoration:none;"><span class="Menu1Title">I Servizi</span></a></td>
    <td width="17%" height="25"><a href="../Prodotti/prodotti.html" onClick="showit(2);" style="text-decoration:none;"><span class="Menu1TitleLoad">I Prodotti</span></a></td>
    <td width="21%" height="25"><a href="../Area_Riservata/area_riservata.html" onClick="showit(3);" style="text-decoration:none;"><span class="Menu1Title">Area Riservata</span></a></td>
    <td width="22%" height="25"><a href="../Area_Commerciale/area_comm.html" onClick="showit(4);" style="text-decoration:none;"><span class="Menu1Title">Area Commerciale</span></a></td>
    <td width="13%" height="25"><a href="../Supporto/supporto.html" onClick="showit(5);" style="text-decoration:none;"><span class="Menu1Title">Supporto</span></a></td>
    
    <!-- END LINKS -->
    What can i do??

  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

    With something like:

    HTML Code:
    <a href="../Home/home.html" onClick="showit(0);" style="text-decoration:none;"><span class="Menu1Title">Home</span></a>
    If you add the return false:

    HTML Code:
    <a href="../Home/home.html" onClick="showit(0);return false;" style="text-decoration:none;"><span class="Menu1Title">Home</span></a>
    The link will not fire. If you leave it the way it was in the first place, the link will fire but, the event may not. If you want both to fire, use return true:

    HTML Code:
    <a href="../Home/home.html" onClick="showit(0);return true;" style="text-decoration:none;"><span class="Menu1Title">Home</span></a>
    As for your body onload issue, I can't see why that won't work off hand. I'll have to look the script over and may even need a link to your problem page to figure that one out.
    - John
    ________________________

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

  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

    Part two of a two part answer:

    The onload thing should work (tested OK locally on a fresh page). I'd try (make sure there is a '2' configured and working using the normal method for this script first):

    HTML Code:
    <body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onLoad="showit(2);">
    If that works, try:

    HTML Code:
    <body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onLoad="showit(2);setVariables();">
    and:

    HTML Code:
    <body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onLoad="showit(2);checkLocation();">
    to see if one or the other or both of the additional functions are to blame.
    - 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
  •