Location: PHPKode > projects > Homeless Mangement Information System > hmis/ecma_example.html
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">

function startup()	{
	
	if(document.getElementById("form_answer[56][6]").checked == false)	{
		document.getElementById("QUEST_57").style.visibility = "hidden";
																		}
					}


function go(clicked_question_number)	{
  
  switch(clicked_question_number)	{

	case "[56][6]":
		
		target_td = "QUEST_57";
		if(document.getElementById(target_td).style.visibility == "visible" && document.getElementById("form_answer[56][6]").checked == true)	{
			uncheck_box("form_answer[57][7]");
			uncheck_box("form_answer[57][8]");
			uncheck_box("form_answer[57][9]");
			uncheck_box("form_answer[57][10]");
		visibility_hidden(target_td);																																			}
		else	{
			visibility_visible(target_td);
				}
		
	break;
									}
										}

function toggle_visibility(target_td)	{

	if (document.getElementById(target_td).style.visibility == "hidden")	{
		document.getElementById(target_td).style.visibility = "visible";
				).style.visibility = "visible";
																			}
	else	{
		document.getElementById(target_td).style.visibility = "hidden";
			}
										}


function toggle_display(target_td)	{

	if (document.getElementById(target_td).style.display == "none")	{
			document.getElementById(target_td).style.display = "";
																	}
	else	{
		document.getElementById(target_td).style.display = "none";
			}	
									}

function visibility_hidden(target_td)	{
	document.getElementById(target_td).style.visibility = "hidden";
										}

function visibility_visible(target_td)	{
	document.getElementById(target_td).style.visibility = "visible";
										}



function uncheck_box(target_checkbox)	{
	document.getElementById(target_checkbox).checked = false;
										}


</SCRIPT>

</head>

<body onload=startup() >
<form>

TurnedawayB<INPUT TYPE="checkbox" onClick="go('[56][6]')" name="form_answer[56][6]" ></input><p>

<INPUT TYPE="checkbox" onClick="go('[65][5]')" name="form_answer[65][5]" >

<table><tr><td id="QUE_answer[65][5]" >

<table><tr><td id="QUEST_57">I'm in a TD, question #57</td></tr></table>


Final Footer<br>

</body>
</html>
html>
Return current item: Homeless Mangement Information System