Flash Games

 FAQ   Search   Members   Groups   Register  User Control Panel      Login 

Your time now:
Mon Nov 23, 2009 12:19 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ]  Bookmark and Share
Author Message
 Post subject: Basic drop down menu...
PostPosted: Tue May 12, 2009 10:05 pm 
Offline

Joined: Tue May 12, 2009 9:57 pm
Posts: 2
Hey guys,
So I just want to create a basic drop down menu, here's the code I'm using and it works fine in Safari and FF mac, but not IE7:

Code:
      <script type="text/javascript">
      <!--
          function toggle_visibility(id) {
             var e = document.getElementById(id);
             if(e.style.display == 'table')
                e.style.display = 'none';
             else
                e.style.display = 'table';
          }
         function visibility_off(id) {
            var e = document.getElementById(id);
            e.style.display = 'none';
          }
          function visibility_on(id) {
            var e = document.getElementById(id);
            e.style.display = 'table';
          }
      //-->
      </script>

Code:
<a class='tab' href='#' onmouseover="visibility_on('services'); visibility_off('clients'); visibility_off('resources');">services</a>

Code:

            <table id='services' style='display: none;' cellpadding="0" cellspacing="0">
               <tr>
                  <td style='background: url(<?php echo $root ?>images/row-1-row-2-drop-downs-top.png) no-repeat; height: 13px'></td>
               </tr>
               <tr>
                  <td class='drop-downs-middle'>
                     <a class='drop-down' href='website-design'>website design >></a>
                     <a class='drop-down' href='website-maintenance'>Website Maintenance >></a>
                     <a class='drop-down' href='search-engine-marketing'>Search Engine Marketing >></a>
                     <a class='drop-down' href='search-engine-optimization'>Search Engine Optimization >></a>
                     <a class='drop-down' href='hosting'>Hosting >></a>
                     <a class='drop-down' href='domain-name-acquisition'>Domain Name Acquisition >></a>
                     <a class='drop-down' href='custom-email-accounts'>Custom Email Accounts >></a>
                     <a class='drop-down' href='enewsletters'>eNewsletters >></a>
                     <a class='drop-down' href='adwords-campaigns'>AdWords Campaigns >></a>
                  </td>
               </tr>
               <tr>
                  <td><img src='<?php echo $root ?>images/row-1-row-2-drop-downs-bottom.png' /></td>
               </tr>
            </table>


Top
 Profile  
 
 Post subject: Re: Basic drop down menu...
PostPosted: Thu May 14, 2009 7:12 am 
Offline
500+ Club
User avatar

Joined: Wed Feb 27, 2008 6:14 am
Posts: 929
Location: Cebu City Philippines
You should be aware that the table value for display property isn't supported on IE, which is the reason why it isn't showing.

I suggest you remove the word "table" on the display property and left the value into empty space. So this part:
Code:
e.style.display == 'table'


...would now read:
Code:
e.style.display == ''


Hope that helps.

_________________
~ Get me some work, I do freelancing ~


Top
 Profile  
 
 Post subject: Re: Basic drop down menu...
PostPosted: Thu May 14, 2009 6:45 pm 
Offline

Joined: Tue May 12, 2009 9:57 pm
Posts: 2
Ah yeah that worked! Hey thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games - TNX Invitation Code - TNX Review


Webmaster - Excruciating - Johnathan - Kotik - Ash - Tomi - rangana - Phate - dflynn - Medley