To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Misc Help > ClientSide Technologies

ClientSide Technologies Discuss HTML/CSS/Javascript, and any other client-side technologies, here.

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-20-2006, 08:12 PM   #1
goboi
Junior Member
 
Join Date: Mar 2006
Posts: 4
Help with hide/show layers

I have been using HTML and some JavaScript for a while now, but this mixing with PHP/CSS has me stumped. I am trying to get the menu to load in the open position on page load. (www.cginformation.org) The categories on the left, here is the current code:
Code:
 <div id="sidebar"> 
  <ul>
    <li> 
      <h2> 
        <a href="#" title="<?php _e('Categories'); ?>" onload="showlayer('subcat1');"><?php _e('Categories'); ?></a>
      </h2>
      <ul id="subcat1" style="display:none; margin:0px; padding:0px;">
        <?php wp_list_cats(); ?>
      </ul>
    </li>
    <li> 
      <h2> 
        <a href="#" title="<?php _e('Archives'); ?>" onclick="showhidelayer('subcat2');"><?php _e('Archives'); ?></a>
      </h2>
      <ul id="subcat2" style="display:none; margin:0px; padding:0px;">
        <?php wp_get_archives('type=monthly'); ?>
      </ul>
    </li>
    <li><script type="text/javascript" src="http://embed.technorati.com/embed/2axrcuxhvt.js"></script><br>
		<!-- Site Meter XHTML Strict 1.0 -->
<script type="text/javascript" src="http://s23.sitemeter.com/js/counter.js?site=s23cginformation">
</script>
</li>
<li><a href="http://www.mozilla.org/products/firefox/"><img src="http://ryanerickson.com/uscg/wp-content/themes/Wuhan/images/firefox.gif" border="0"></a></li>
<li><a href="http://cginformation.org"><img src="http://ryanerickson.com/uscg/images/cginfo.png"></a></li>

  </ul>
</div>
As the code is now, one has to click on the categories to drop down the menu, what do I need to change in this code to have it show on load without having to click on it? Thanks in advance! ~Ryan

Last edited by goboi; 03-20-2006 at 08:37 PM.
goboi is offline   Reply With Quote
Old 03-21-2006, 01:07 AM   #2
bpat1434
NMaOtBG
 
bpat1434's Avatar
 
Join Date: Oct 2004
Location: Around 255.255.255.0
Posts: 8,093
Well, the JS function would have been helpful to look at; however, if you just call the function on page load, you'll be fine:
HTML Code:
<body onLoad="showhidelayer('subcat1');">
THis will automatically show the "Categories" sub-categories....

Last edited by bpat1434; 03-21-2006 at 01:10 AM.
bpat1434 is offline   Reply With Quote
Old 03-21-2006, 02:08 AM   #3
goboi
Junior Member
 
Join Date: Mar 2006
Posts: 4
dooooh

My god do I feel stupid, I was trying to get WAY to into it. Thanks bpat1434!
goboi is offline   Reply With Quote
Old 03-21-2006, 11:44 AM   #4
bpat1434
NMaOtBG
 
bpat1434's Avatar
 
Join Date: Oct 2004
Location: Around 255.255.255.0
Posts: 8,093
No problem!!

It took me some time to... had to get the frames source.... #2 reason why I hate frames, different sources...
bpat1434 is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 02:55 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.