Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 26th, 2004, 05:08 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default menu not displaying a button

Hi there

My navigation is all fine except that it doesn't display the last button in the menu (contact us) - can anyone help; here's the relevant code - it's like a drop down menu:

Help much appreciated!

<script language="JavaScript" type="text/JavaScript">
// Quick browser check !
ie4 = (document.all) ? true : false;

function showSubCats(targetId, id2, id3, id4, id5, id6, id7, id8){
    if (ie4){

        target = document.all(targetId);
        id2 = document.all(id2);
        id3 = document.all(id3);
        id4 = document.all(id4);
        id5 = document.all(id5);
        id6 = document.all(id6);
        id7 = document.all(id7);
        id8 = document.all(id8);


        if (target.style.display == "none"){
            target.style.display = "";
        } else {
            target.style.display = "none";
        }

        if (id2.style.display == ""){
            id2.style.display = "none";
        }

        if (id3.style.display == ""){
            id3.style.display = "none";
        }

        if (id4.style.display == ""){
            id4.style.display = "none";
        }

        if (id5.style.display == ""){
            id5.style.display = "none";
        }

        if (id6.style.display == ""){
            id6.style.display = "none";
        }
        if (id7.style.display == ""){
            id7.style.display = "none";
        }
        if (id8.style.display == ""){
            id8.style.display = "none";
        }

    }//End If
    else {
    document.location = "?NavID=" + targetId
    }
</script>
<body>

        <td colspan="2" >
          <p><a href="sar.asp" ><img src="image_bin/btn_home_up.gif" alt="Home" name="btn_home" width="140" height="15" border="0"></a></p>
        </td>
      </tr>
      <tr id="RS" style="display:none"> </tr>
      <tr valign="middle" bgcolor="#6699CC">
        <td colspan="2" ></td>
      </tr>
      <tr valign="middle" bgcolor="#6699CC">
        <td colspan="2" >
          <p><a href="javascript:showSubCats('IT','RS','PG','IM',' LT','GR','PR','CU')" ><img src="image_bin/about_us_up.gif" alt="About Us" name="about_us" width="140" height="15" border="0"></a></p>
        </td>
      </tr>
      <tr valign="middle" bgcolor="#6699CC" id="IT" style="display:none">
        <td width="10" bgcolor="#000066" >&nbsp;</td>
        <td >
          <p><a href="objectives.asp" title="Objectives"><img src="image_bin/about_sub_obj.gif" alt="Objectives" width="130" height="15" border="0"></a><br>
<p>
        </td>
      </tr>
      <tr valign="middle" bgcolor="#6699CC">
        <td height="1" colspan="2" ><img src="images/spacer.gif" width="1" height="1" /></td>
      </tr>
      <tr valign="middle" bgcolor="#6699CC">
        <td colspan="2" ><p><a href="pgm.asp"><img src="image_bin/pgm_up.gif" alt="Platinum Group Metals" name="pgm" width="140" height="15" border="0"></a></p></td>
      </tr>
       <tr id="PG" style="display:none">
      <tr valign="middle" bgcolor="#6699CC">
        <td colspan="2" >
          <p><a href="javascript:showSubCats('IM','RS','PG','IT',' LT','GR','PR','CU')"><img src="image_bin/projects_up.gif" alt="Projects" name="projects" width="140" height="15" border="0"></a></p>
        </td>
      </tr>
      <tr valign="middle" bgcolor="#6699CC" id="IM" style="display:none">
        <td width="10" bgcolor="#000066" >&nbsp;</td>
        <td >
          <p><a href="leeuwkop.asp"><img src="image_bin/leeuwkop.gif" alt="Leeuwkop" width="130" height="15" border="0" title="Leeuwkop"></a><br>

          </p>
        </td>
      </tr>
      <tr valign="middle" bgcolor="#6699CC">
        <td height="1" colspan="2" ><img src="images/spacer.gif" width="1" height="1" /></td>
      </tr>
      <tr valign="middle" bgcolor="#6699CC">
        <td colspan="2" ><p><a href="geo_reports.asp"> <img src="image_bin/geo_up.gif" alt="Geological Report" name="geo" width="140" height="15" border="0" id="geo"></a>
          </p></td>
      </tr>
       <tr id="GR" style="display:none">
      <tr valign="middle" bgcolor="#6699CC">
        <td colspan="2" >
          <p><a href="javascript:showSubCats('LT','RS','PG','IM',' IT','GR','PR','CU')"><img src="image_bin/ir_up.gif" alt="Investor Relations" name="ir" width="140" height="15" border="0"></a></p>
        </td>
      </tr>
      <tr valign="middle" bgcolor="#6699CC" id="LT" style="display:none">
        <td width="10" bgcolor="#000066" >&nbsp;</td>
        <td>
          <p><a href="news_release.asp" title="News Release"><img src="image_bin/ir_sub_release.gif" alt="News Releases" width="130" height="15" border="0"></a><br>
          </p>
        </td>
      </tr>
      <tr valign="middle" bgcolor="#6699CC"><td colspan="2" >
        <p><a href="pictoral.asp"><img src="image_bin/pic_up.gif" alt="Pictoral Review" name="pic" width="140" height="15" border="0"></a></p>
      </td>
      </tr>
       <tr valign="middle" bgcolor="#6699CC" id="PR" style="display:none">
      <td colspan="2" ><p><a href="contact.asp"><img src="image_bin/contact_up.gif" alt="Contact Us" name="contact" width="140" height="15" border="0"></a></p></td>
      </tr>
       <tr valign="middle" bgcolor="#6699CC" id="CU" style="display:none">
     <tr bgcolor="#6699CC">
        <td height="1" colspan="2" ><img src="images/spacer.gif" width="1" height="1" /></td>
      </tr>
Reply With Quote
  #2 (permalink)  
Old April 26th, 2004, 06:24 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

probably because you have style="display:none" on the parent <tr>
Reply With Quote
  #3 (permalink)  
Old April 26th, 2004, 07:05 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default

thanks Phil

So do I need to change this bit?

<td colspan="2" ><p><a href="contact.asp"><img src="image_bin/contact_up.gif" alt="Contact Us" name="contact" width="140" height="15" border="0"></a></p></td>
      </tr>
       <tr valign="middle" bgcolor="#6699CC" id="CU" style="display:none">
     <tr bgcolor="#6699CC">
        <td height="1" colspan="2" ><img src="images/spacer.gif" width="1" height="1" /></td>
      </tr>
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CH 15 Context Menu - Element Menu Items Razzy The Pug BOOK: Ivor Horton's Beginning Visual C++ 2005 2 November 9th, 2008 03:53 PM
menu Through Button Theone84 ASP.NET 2.0 Professional 0 September 26th, 2008 06:50 AM
disable the hide button in the pivot menu paul20091968 Excel VBA 0 June 29th, 2006 08:59 AM
Navigation button is not displaying picture ceema Crystal Reports 1 March 26th, 2006 04:06 AM
depending on radio button value Drop down menu MuthuAL Classic ASP Databases 5 December 29th, 2004 01:54 AM



All times are GMT -4. The time now is 05:59 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.