Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show/Hide Load Collapsed Help Please 1

Status
Not open for further replies.
Really? Can anyone else hit it? It's out there on my web server.
 
CampbellIT -

I viewed the website. If you want to start out with it hidden, simply set the style (either inline or in the .css file should work) to hide.

Code:
...
    display: none;
...

Jason
 
Jason, thanks for the input. I'm so css and javascript challened.... I don't even know where to put that statement. I've sampled with the inline css and no change. Does it just go under the font style statements?
 
In your heading you have a style tag - insert the line:

Code:
#Council, #Planning, #ParksRec, #HistoricPreservation, #CivicImprovement, #Bicycle { display: none; }

Like so:

Code:
<style type="text/css">
<!--
.style22 {font-size: 10}
.style23 {font-size: 12px}
.style25 {
	font-size: 12px;
	color: #000000;
	font-style: italic;
}

#Council, #Planning, #ParksRec, #HistoricPreservation, #CivicImprovement, #Bicycle { display: none; }


-->
</style>
 
Right on, that does work. Thank you. The show/hide link is now inoperable. Any clues on this?
 
Change:
Code:
if ( el.style.display = 'none' ) {

to

Code:
if ( el.style.display =[COLOR=#ff0000]=[/color] 'none' ) {
 
I see what is going on - took me a min to find the javascript function - it should be inside the 'head' element, and you don't need to repeat it for each part (since you are essentially re-using the same function and code).

Main thing is that you need to use '==' operator for comparison and '=' for setting the variable.


Code:
<script language="JavaScript" type="text/JavaScript">
function show_hide (obj) { 
  var el = document.getElementById(obj); 
  if ( el.style.display == 'block' ) { 
     el.style.display = 'none'; 
  } else { 
     el.style.display = 'block'; 
  } 

} 
</script>

Jason
 
the first time I went there, it took quite a while to load the page - there was a significant delay on the last item loaded (whatever that is, I didn't inspect it to find out) It did load via Safari on Mac OS/X10.4

Jason
 
All, we have made some DNS changes. Perhaps that's the reason. Thank you for your efforts, and J-man for sorting out my issues. ~Todd
 
Jman... again thanks for your help. Now that everything works properly, when I go to open the page in my editor (Dreamweaver) I cannot see the content in the DIV container. Do you know what I can to to make it show within an GUI editor?
 
 http://www.cityofcampbell.com/_dwscreen.jpg
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top