javascript-togglescript

Gesponsorde koppelingen

PHP script bestanden

  1. javascript-togglescript

« Lees de omschrijving en reacties

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<script language="Javascript">
function toggle(layer,kind,task) {
    
    if (kind=="visibility"){
        if (task=="hide")
            vis_to = "hidden";
        else if (task=="show")
            vis_to = "visible";
        else {
            
            if (document.layers)
                vis_to = (document.layers[layer].visibility=="hide") ? "show" : "hide";
                
            else if (document.all)
                vis_to = (document.all[layer].style.visibility=="hidden") ? "visible" : "hidden";
                
            else if (document.getElementById)
                vis_to = (document.getElementById(layer).style.visibility=="hidden") ? "visible" : "hidden";
        }
    } else if (kind=="display"){
        if (task=="hide")
            dis_to = "none";
        else if (task=="show")
            dis_to = "block";
        else {
            if (document.layers)
                dis_to = (document.layers[layer].display=="none") ? "block" : "none";
                
            else if (document.all)
                dis_to = (document.all[layer].style.display=="none") ? "block" : "none";
                
            else if (document.getElementById)
                dis_to = (document.getElementById(layer).style.display=="none") ? "block" : "none";
        }
    }
    
    if (document.layers)
        (kind=="display") ? document.layers[layer].display = dis_to : document.layers[layer].visibility = vis_to;
        
    else if (document.all)
        (kind=="display") ? document.all[layer].style.display = dis_to : document.all[layer].style.visibility = vis_to;
        
    else if (document.getElementById)
        (kind=="display") ? document.getElementById(layer).style.display = dis_to : document.getElementById(layer).style.visibility = vis_to;
}
</script>

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.