function getradiovalue( radioname ) { //alert( arguments.callee.name + " :: radioname="+radioname ); var radioele = document.getElementsByName( radioname ); var radiovalue = "not checked"; //alert( "len=" + radioele.length ); for( i = 0; i < radioele.length; i++) { //alert( arguments.callee.name + " :: i=" + i + " value=" + radioele[ i ].value ); if( radioele[ i ].checked ) { radiovalue = radioele[ i ].value; break; } } //alert( "retval=" + radiovalue ); return radiovalue; } function getoptionvalue( optioname ) { //alert( arguments.callee.name + " :: optioname="+optioname ); var optionele = document.getElementsByName( optioname )[ 0 ]; var optionvalue = optionele.value; //alert( "retval=" + optionvalue ); return optionvalue; } function showhideall() { var curgender = getoptionvalue( 'row[geschlecht]' ); var curusum = getradiovalue( 'row[jugendsumme]' ); var curdsb = getradiovalue( 'row[dsbvergleich]' ); var curland = getradiovalue( 'row[landesvergleich]' ); var curbezirk = getradiovalue( 'row[bezirksvergleich]' ); $( ".rowgw").css("display", "table-row" ); $( ".rowgm").css("display", "table-row" ); $( ".rowgsum").css("display", "table-row" ); showdiv( 'bezirksvergleich', curbezirk ); showdiv( 'landesvergleich', curland ); showdiv( 'dsbvergleich', curdsb ); showhideusum( curusum, curgender ); } function hidegender( choice ) { // aufruf mit choice=mws/mw/s/m/w //alert( arguments.callee.name + " :: choice="+choice ); if ( choice == "mws" ) { return; } if ( choice == "mw" ) { $( ".rowgsum" ).css( "display", "none" ); return; } if ( choice == "m" ) { $( ".rowgw").css("display", "none" ); $( ".rowgsum").css("display", "none" ); return; } if ( choice == "w" ) { $( ".rowgm").css("display", "none" ); $( ".rowgsum").css("display", "none" ); return; } if ( choice == "s" ) { $( ".rowgw").css("display", "none" ); $( ".rowgm").css("display", "none" ); return; } alert( arguments.callee.name + " :: choice is invalid=[" + choice + "]" ); return; } function showhideusum( choiceu, choicegender ) { // aufruf mit u25 oder u18 oder u- //alert( arguments.callee.name + " :: choiceu=" + choiceu + " choicegender=" + choicegender ); if ( choiceu == "u18" ) { $( ".rowu25sum").css("display", "none" ); $( ".rowu18sum").css("display", "table-row" ); hidegender( choicegender ); return; } if ( choiceu == "u25" ) { $( ".rowu18sum").css("display", "none" ); $( ".rowu25sum").css("display", "table-row" ); hidegender( choicegender ); return; } if ( choiceu == "u-" ) { $( ".rowu18sum").css("display", "none" ); $( ".rowu25sum").css("display", "none" ); return; } alert( arguments.callee.name + " :: choice is invalid=[" + choice + "]" ); return; } function showdiv( div, choice ) { // aufruf mit j/n //alert( arguments.callee.name + " :: div="+div+" choice="+choice ); if ( choice == "j" ) { $( "#div-"+div ).css("display", "block" ); return; } if ( choice == "n" ) { $( "#div-"+div ).css("display", "none" ); return; } alert( arguments.callee.name + " :: choice is invalid=[" + choice + "]" ); return; }