DIR : /home/kozerus/public_html/hideshow_best.html
/home/kozerus/public_html
<html>
<head>
<title>hideshow.html 20211007_1800 htmbugs</title>
<!--
<title>hide.html 20200217_1300 htmbugs</title>
<title>hide.html 20200216_1200</title>
-->
<script id="script_hideshow">
function script_hideshow(element) {
var htmout = ""; var htmout_b = "";
var j=0; var k=0;
var htmbugs = "";
htmbugs += '<div id="div_htmbugs">';
htmbugs += ' <h1>div_htmbugs</h1>';
htmbugs += ' <pre>';
var style_d = "_style_d";
var style_v = "_style_v";
var divid = "";
var div_divid = "";
var divids = "abc <hr> jk sk <hr> av db dd fb pn <br> sl tl tm yt zm <hr> xyz".split(" ");
// alert( "BUGS_102 divids="+divids );
htmout += '<div id="div_buttons_hideshow">';
htmout_b += '<div id="div_buttons_hideshow_b">';
if(( element == "div_alloff" )) {
for( j=0; j<divids.length; j++ ) {
// htmout = ""; htmout_b="";
divid=divids[j];
div_divid="div_"+divid;
if( divid == "<br>" ) {
htmout += divid;
htmout_b += divid;
continue;
}
if( divid == "<hr>" ) {
htmout += divid;
htmout_b += divid;
continue;
}
if(! document.getElementById(div_divid)) { continue; }
if( document.getElementById(div_divid)) {
document.getElementById(div_divid).style.display="none";
}
htmout += '<img src="/imgs/btn/koeyeb_'+divid+'.png" height=50 onclick="script_hideshow(\''+divid+'\');return false;" alt="btn_'+divid+'">';
htmout_b += '<img src="/imgs/btn/koeyeb_'+divid+'.png" height=50 onclick="script_hideshow(\''+divid+'\');return false;" alt="btn_'+divid+'">';
}
htmout += " </div>\n";
htmout_b += " </div>\n";
document.getElementById("div_buttons_hideshow").innerHTML = htmout;
document.getElementById("div_buttons_hideshow_b").innerHTML = htmout_b;
return;
}
if(( element == "div_toggle" )) {
// htmout = ""; htmout_b="";
for( j=0; j<divids.length; j++ ) {
divid=divids[j];
div_divid="div_"+divid;
if( divid == "<br>" ) {
htmout += divid;
htmout_b += divid;
continue;
}
if( divid == "<hr>" ) {
htmout += divid;
htmout_b += divid;
continue;
}
// alert( "BUGS_1770 hideshow toggle j="+j+" element="+element );
if(! document.getElementById(div_divid)) { continue; }
if( document.getElementById(div_divid)) {
if( document.getElementById(div_divid).style.display == "none" ) {
document.getElementById(div_divid).style.display="inline";
htmout += '<img src="/imgs/btn/koeyew_'+divid+'.png" height=50 onclick="script_hideshow(\''+divid+'\');return false;" alt="btn_'+divid+'">';
htmout_b += '<img src="/imgs/btn/koeyew_'+divid+'.png" height=50 onclick="script_hideshow(\''+divid+'\');return false;" alt="btn_'+divid+'">';
}
else {
document.getElementById(div_divid).style.display="none";
htmout += '<img src="/imgs/btn/koeyeb_'+divid+'.png" height=50 onclick="script_hideshow(\''+divid+'\');return false;" alt="btn_'+divid+'">';
htmout_b += '<img src="/imgs/btn/koeyeb_'+divid+'.png" height=50 onclick="script_hideshow(\''+divid+'\');return false;" alt="btn_'+divid+'">';
}
}
}
htmout += " </div>\n";
htmout_b += " </div>\n";
document.getElementById("div_buttons_hideshow").innerHTML = htmout;
document.getElementById("div_buttons_hideshow_b").innerHTML = htmout_b;
return;
}
if( element == "div_allon" ) {
// htmout = ""; htmout_b = "";
for( j=0; j<divids.length; j++ ) {
divid=divids[j];
div_divid="div_"+divid;
if( divid == "<br>" ) {
htmout += divid;
htmout_b += divid;
// alert( "BUGS_105 <BR> divid="+divid+" htmout="+htmout );
continue;
}
if( divid == "<hr>" ) {
htmout += divid;
htmout_b += divid;
// alert( "BUGS_105 <HR> divid="+divid+" htmout="+htmout );
continue;
}
if(! document.getElementById(div_divid)) { continue; }
if( document.getElementById(div_divid)) {
document.getElementById(div_divid).style.display="inline";
}
htmout += '<img src="/imgs/btn/koeyew_'+divid+'.png" height=50 onclick="script_hideshow(\''+divid+'\');return false;" alt="btn_'+divid+'">\n';
htmout_b += '<img src="/imgs/btn/koeyew_'+divid+'.png" height=50 onclick="script_hideshow(\''+divid+'\');return false;" alt="btn_'+divid+'">\n';
// alert( "BUGS_115 j="+j+" divid="+divid+" htmout="+htmout+ "element="+element );
}
document.getElementById("div_buttons_hideshow").innerHTML = htmout;
document.getElementById("div_buttons_hideshow_b").innerHTML = htmout_b;
return;
}
// alert( "BUGS_1800 hideshow element="+element );
for( j=0; j<divids.length; j++ ) {
divid=divids[j];
div_divid="div_"+divid;
if( divid == "<br>" ) {
// alert( "BUGS_151 <BR> divid="+divid+" element="+element );
htmout += divid;
continue;
}
if( divid == "<hr>" ) {
// alert( "BUGS_152 <HR> divid="+divid+" element="+element );
htmout += divid;
continue;
}
if(! document.getElementById(div_divid)) { continue; }
style_v = document.getElementById(div_divid).style.visibility;
// alert( "BUGS_132 j="+j+" style_d="+style_d+" style_v="+style_v );
// document.getElementById(div_divid).style.display = "none";
style_d = document.getElementById(div_divid).style.display;
// alert( "BUGS_133 j="+j+" style_d="+style_d+" style_v="+style_v );
htmbugs += "htmbugs j="+j+" divid="+divid;
htmbugs += " -== div_divid="+div_divid;
htmbugs += " element="+element;
htmbugs += " =- -=";
htmbugs += " style_d="+style_d+"";
htmbugs += " style_v="+style_v+"";
htmbugs += "====================\n";
// if( div_divid.match(/element/) != '') {
// if( div_divid.match(element)) {
// if( div_divid == element ) {
// alert( "BUGS_141 _MATCH_ div_divid="+div_divid+" element="+element+" style_d="+style_d+" style_v="+style_v );
// htmbugs += "BUGS_141 _MATCH_ div_divid="+div_divid+" element="+element+" style_d="+style_d+" style_v="+style_v;
// }
// else {
// alert( "BUGS_142 nomatch div_divid="+div_divid+" element="+element+" style_d="+style_d+" style_v="+style_v );
// htmbugs += "BUGS_142 _match_ div_divid="+div_divid+" element="+element+" style_d="+style_d+" style_v="+style_v;
// }
// selected button
// if( div_divid.match(element) ) {
if( div_divid == element ) {
style_d = document.getElementById(div_divid).style.display;
// alert( "BUGS_160 MATCH div_divid="+div_divid+" element="+element+" style_d="+style_d );
if( document.getElementById(div_divid).style.display == "none" ) {
htmout += '<img src="/imgs/btn/koeyew_'+divid+'.png" height=50 onclick="script_hideshow(\''+div_divid+'\');return false;" alt="btn_'+divid+'_hide">';
htmbugs += "BUGS_161 _DIV_DIVID-NONE div_divid="+div_divid+" element="+element+" style_d="+style_d+" style_v="+style_v;
document.getElementById(div_divid).style.display="inline";
}
else {
htmout += '<img src="/imgs/btn/koeyeb_'+divid+'.png" height=50 onclick="script_hideshow(\''+div_divid+'\');return false;" alt="btn_'+divid+'_hide">';
htmbugs += "BUGS_162 DIV_DIVID-INLINE div_divid="+div_divid+" element="+element+" style_d="+style_d+" style_v="+style_v;
document.getElementById(div_divid).style.display="none";
}
}
// other buttons
// else {
if( div_divid != element ) {
// alert( "BUGS_170 rest div_divid="+div_divid+" element="+element );
if( document.getElementById(div_divid).style.display == "none" ) {
htmout += '<img src="/imgs/btn/koeyeb_'+divid+'.png" height=50 onclick="script_hideshow(\''+div_divid+'\');return false;" alt="btn_'+divid+'_hide">';
htmbugs += "BUGS_171 div_divid_none div_divid="+div_divid+" element="+element+" style_d="+style_d+" style_v="+style_v;
}
else {
htmout += '<img src="/imgs/btn/koeyew_'+divid+'.png" height=50 onclick="script_hideshow(\''+div_divid+'\');return false;" alt="btn_'+divid+'_hide">';
htmbugs += "BUGS_172 div_divid_inline div_divid="+div_divid+" element="+element+" style_d="+style_d+" style_v="+style_v;
}
}
if( divid == "pn" ) { htmout += "<br>"; }
if( divid == "<br>" ) { htmout += "<br>\n"; }
if( divid == "<hr>" ) { htmout += "<hr>\n"; }
}
htmout += ' </div>';
htmbugs += " </pre>";
htmbugs += " </div>";
// alert( "BUGS_181 script_hideshow divid="+divid+" htmout="+htmout );
// alert( "BUGS_200 htmbugs="+htmbugs );
// document.getElementById("div_htmbugs").innerHTML = htmbugs;
document.getElementById("div_buttons_hideshow").innerHTML = htmout;
document.getElementById("div_buttons_hideshow_b").innerHTML = htmout;
}
</script>
<script id="script_startup">
function startup(){
// alert("BUGS_100 startup");
// hideshow("fb");
// hideshow("div_fb");
// hideshow("alloff");
// hideshow("allon");
// hideshow("toggle");
}
</script>
<style id="style_startup">
// body{ background: darkslategrey }
</style>
</head>
<body bgcolor=slategrey onload="startup();return false;">
<h1>hide.html 20200217_1000</h1>
<div id="div_btn_hideshow" >
<hr color=black>
<hr color=white>
<div hidden id="div_buttons">
<button type="button" onclick="script_hideshow('div_alloff');return false">alloff</button>
<button type="button" onclick="script_hideshow('div_toggle');return false">toggle</button>
<button type="button" onclick="script_hideshow('div_allon');return false">allon</button>
<hr>
<button type="button" onclick="script_hideshow('div_abc');return false">hide_abc</button>
<hr>
<button type="button" onclick="script_hideshow('div_jk');return false">hide_jk</button>
<button type="button" onclick="script_hideshow('div_sk');return false">hide_sk</button>
<br>
<button type="button" onclick="script_hideshow('div_av');return false">hide_av</button>
<button type="button" onclick="script_hideshow('div_db');return false">hide_db</button>
<button type="button" onclick="script_hideshow('div_dd');return false">hide_dd</button>
<button type="button" onclick="script_hideshow('div_fb');return false">hide_fb</button>
<button type="button" onclick="script_hideshow('div_pn');return false">hide_pn</button>
<br>
<button type="button" onclick="script_hideshow('div_alloff');return false">hide_sl</button>
<button type="button" onclick="script_hideshow('div_toggle');return false">hide_sl</button>
<button type="button" onclick="script_hideshow('div_allon');return false">hide_sl</button>
<br>
<button type="button" onclick="script_hideshow('div_sl');return false">hide_sl</button>
<button type="button" onclick="script_hideshow('div_tl');return false">hide_tl</button>
<button type="button" onclick="script_hideshow('div_tm');return false">hide_tm</button>
<button type="button" onclick="script_hideshow('div_yt');return false">hide_yt</button>
<button type="button" onclick="script_hideshow('div_zm');return false">hide_zm</button>
</div>
<hr color=white>
<img src="/imgs/btn/koeye_alloff.png" height=50 onclick="script_hideshow('div_alloff');return false;" alt="btn_alloff">
<img src="/imgs/btn/koeye_toggle.png" height=50 onclick="script_hideshow('div_toggle');return false;" alt="btn_toggle">
<img src="/imgs/btn/koeye_allon.png" height=50 onclick="script_hideshow('div_allon');return false;" alt="btn_allon">
<hr>
<div id="div_buttons_hideshow">
<img src="/imgs/btn/koeyew_abc.png" height=50 onclick="script_hideshow('div_abc');return false;" alt="btn_abc">
<hr>
<img src="/imgs/btn/koeyew_jk.png" height=50 onclick="script_hideshow('div_jk');return false;" alt="btn_jk">
<img src="/imgs/btn/koeyew_sk.png" height=50 onclick="script_hideshow('div_sk');return false;" alt="btn_sk">
<hr>
<img src="/imgs/btn/koeyew_av.png" height=50 onclick="script_hideshow('div_av');return false;" alt="btn_av_hide">
<img src="/imgs/btn/koeyew_db.png" height=50 onclick="script_hideshow('div_db');return false;" alt="btn_db_hide">
<img src="/imgs/btn/koeyew_dd.png" height=50 onclick="script_hideshow('div_dd');return false;" alt="btn_dd_hide">
<img src="/imgs/btn/koeyew_fb.png" height=50 onclick="script_hideshow('div_fb');return false;" alt="btn_fb_hide">
<img src="/imgs/btn/koeyew_pn.png" height=50 onclick="script_hideshow('div_pn');return false;" alt="btn_pn_hide">
<br>
<img src="/imgs/btn/koeyew_sl.png" height=50 onclick="script_hideshow('div_sl');return false;" alt="btn_sl_hide">
<img src="/imgs/btn/koeyew_tl.png" height=50 onclick="script_hideshow('div_tl');return false;" alt="btn_tl_hide">
<img src="/imgs/btn/koeyew_tm.png" height=50 onclick="script_hideshow('div_tm');return false;" alt="btn_tm_hide">
<img src="/imgs/btn/koeyew_yt.png" height=50 onclick="script_hideshow('div_yt');return false;" alt="btn_yt_hide">
<img src="/imgs/btn/koeyew_zm.png" height=50 onclick="script_hideshow('div_zm');return false;" alt="btn_zm_hide">
</div>
<hr color=white>
<hr color=black>
</div>
<div hidden id="div_alloff"> <h1>div_alloff</h1><img src="/imgs/btn/koeye_alloff.png" height=50> </div>
<div hidden id="div_toggle"> <h1>div_toggle</h1><img src="/imgs/btn/koeye_toggle.png" height=50> </div>
<div hidden id="div_allon"> <h1>div_allon</h1><img src="/imgs/btn/koeye_allon.png" height=50> </div>
<hr>
<div id="div_abc_xyz"> <h1>div_abc_xyz</h1> </div>
<hr>
<div id="div_jk"> <h1>div_jk</h1> </div>
<div id="div_sk"> <h1>div_sk</h1> </div>
<hr>
<div id="div_av"> <h1>div_av</h1> </div>
<div id="div_db"> <h1>div_db</h1> </div>
<div id="div_dd"> <h1>div_dd</h1> </div>
<div id="div_fb"> <h1>div_fb</h1> </div>
<div id="div_pn"> <h1>div_pn</h1> </div>
<div id="div_sl"> <h1>div_sl</h1> </div>
<div id="div_tl"> <h1>div_tl</h1> </div>
<div id="div_tm"> <h1>div_tm</h1> </div>
<div id="div_yt"> <h1>div_yt</h1> </div>
<div id="div_zm"> <h1>div_zm</h1> </div>
<hr>
<div id="div_xyz"> <h1>div_xyz</h1> </div>
<div hidden id="div_htmbugs"> <h2>div_htmbugs</h2> </div>
<img src="/imgs/btn/koeye_alloff.png" height=50 onclick="script_hideshow('div_alloff');return false;" alt="btn_alloff">
<img src="/imgs/btn/koeye_toggle.png" height=50 onclick="script_hideshow('div_toggle');return false;" alt="btn_toggle">
<img src="/imgs/btn/koeye_allon.png" height=50 onclick="script_hideshow('div_allon');return false;" alt="btn_allon">
<hr>
<div id="div_buttons_hideshow_b">
<h1>div_buttons_hideshow_b</h1>
<img src="/imgs/btn/koeyew_xyz.png" height=50 onclick="script_hideshow('div_xyz');return false;" alt="btn_xyz">
<hr>
<img src="/imgs/btn/koeyew_jk.png" height=50 onclick="script_hideshow('div_jk');return false;" alt="btn_jk">
<img src="/imgs/btn/koeyew_sk.png" height=50 onclick="script_hideshow('div_sk');return false;" alt="btn_sk">
<br>
<img src="/imgs/btn/koeyew_av.png" height=50 onclick="script_hideshow('div_av');return false;" alt="btn_av_hide">
<img src="/imgs/btn/koeyew_db.png" height=50 onclick="script_hideshow('div_db');return false;" alt="btn_db_hide">
<img src="/imgs/btn/koeyew_dd.png" height=50 onclick="script_hideshow('div_dd');return false;" alt="btn_dd_hide">
<img src="/imgs/btn/koeyew_fb.png" height=50 onclick="script_hideshow('div_fb');return false;" alt="btn_fb_hide">
<img src="/imgs/btn/koeyew_pn.png" height=50 onclick="script_hideshow('div_pn');return false;" alt="btn_pn_hide">
<br>
<img src="/imgs/btn/koeyew_sl.png" height=50 onclick="script_hideshow('div_sl');return false;" alt="btn_sl_hide">
<img src="/imgs/btn/koeyew_tl.png" height=50 onclick="script_hideshow('div_tl');return false;" alt="btn_tl_hide">
<img src="/imgs/btn/koeyew_tm.png" height=50 onclick="script_hideshow('div_tm');return false;" alt="btn_tm_hide">
<img src="/imgs/btn/koeyew_yt.png" height=50 onclick="script_hideshow('div_yt');return false;" alt="btn_yt_hide">
<img src="/imgs/btn/koeyew_zm.png" height=50 onclick="script_hideshow('div_zm');return false;" alt="btn_zm_hide">
</div>
</body>
</html>
//