SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Script Needed!

Hybrid View

  1. #1
    SitePoint Wizard westmich's Avatar
    Join Date
    Mar 2000
    Location
    Muskegon, MI
    Posts
    2,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I feel strange asking this, but I've exhausted all my normal links, reference material, and tried several times myself.

    I have a script that when click a link, it toggles a paragraph of text (or anything else between the DIV tags) from hidden to visible and back again with another click. It works fine in IE and Netscape 4.x. It only half works in Opera and doesn't work at all in Netscape 6.
    Westmich
    Smart Web Solutions for Smart Clients
    http://www.mindscapecreative.com

  2. #2
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What about this one from Bratta.com?
    My 2 Cents (or is that 2.2 Cents including GST?)

  3. #3
    JavaScript Guru (Big Ego) Arielladog's Avatar
    Join Date
    Jul 1999
    Location
    SC, USA
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey guys,

    I didn't really look at BC's link...usually I find codes on bratta.com and other places convaluted. Instead, try something like this:

    Code:
    function accessCSS(layerID){
    	if(document.getElementById){
    		return document.getElementById(layerID).style;
    	}else if(document.all){
    		return document.all[layerID].style;
    	}else if(document.layers){
    		return document.layers[layerID];
    	}
    }
    
    function toggleVis(layerID){
    	if(accessCSS(layerID).visibility=="hidden" || accessCSS(layerID).visibility=="hide"){
    		accessCSS(layerID).visibility="visible";
    	}else{
    		accessCSS(layerID).visibility="hidden";
    	}
    }
    I use that code in a tutorial I'm writing.

    aDog

  4. #4
    SitePoint Wizard westmich's Avatar
    Join Date
    Mar 2000
    Location
    Muskegon, MI
    Posts
    2,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just posting to let you know I appreciate the help, although, I haven't had a chance to check-out either one.

    I wanted to use this on my resume site.

    There are certain areas that I want to show or leave them hidden because of page length. I would just hate to have technical problems on a resume site for a Web developer
    Westmich
    Smart Web Solutions for Smart Clients
    http://www.mindscapecreative.com


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
  •