This repository has been archived by the owner on Apr 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Patrick Bernard
committed
Oct 12, 2006
1 parent
1b22f55
commit 8d2a345
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//prend en parametre l'id de l'objet a cacher/decouvrir | ||
//resultat: cache/decouvre l'objet au meme niveau dont la classe est hideable | ||
function hideOrNot(idElement){ | ||
if(!idElement) return false; | ||
|
||
var toHide = document.getElementById(idElement); | ||
|
||
if(toHide.className=='hidden'){ | ||
toHide.className='notHidden'; | ||
} | ||
else{ | ||
toHide.className='hidden'; | ||
} | ||
} | ||
|
||
/* | ||
@param: idcontainer, the of the container where to search | ||
*/ | ||
function hideAll(idContainer){ | ||
var iterator = 0; | ||
var a = document.getElementById(idContainer); | ||
var spanz = a.getElementsByTagName('span'); | ||
while(iterator < spanz.lenght){ | ||
if(spanz[iterator].className == "notHidden"){ | ||
spanz[iterator].className = "hidden"; | ||
} | ||
} | ||
} | ||
|
||
window.onload = hideAll("edit_form"); |