"Out of memory" error in javascript!?
Posted: Tue Jul 15, 2003 12:45 pm
here is my code.... when you ckeck the "Iris" radio button it should disable the "Date" radio button and hide the Date Options if they are visible.... clicking on the other buttons will also run checks to make sure everything is how it should be...
i get a JS error when i click on the "Iris" radio button, error is as follows:
"A Runtime Error Has Occured.
Do yo wish to debug?
Line: 14
Error: Out of memory"
i get a JS error when i click on the "Iris" radio button, error is as follows:
"A Runtime Error Has Occured.
Do yo wish to debug?
Line: 14
Error: Out of memory"
Code: Select all
<HTML>
<HEAD>
<TITLE>Search</TITLE>
<script language="javascript">
function check_date()
{
if(document.getElementById("date_radio").checked == true) { document.getElementById("date_row").style.display = "inline"; old_search = document.getElementById("search_box").value; document.getElementById("search_box").value = "MM-DD-YYYY" }
else { document.getElementById("date_row").style.display = "none"; if(document.getElementById("search_box").value == "MM-DD-YYYY") { document.getElementById("search_box").value = old_search; } }
}
function check_test()
{
if(document.getElementById("iris_test").checked == true)
{
document.getElementById("date_radio").checked = false;
document.getElementById("ssn_radio").checked = true;
document.getElementById("date_radio").disabled = true;
check_test();
}
else { document.getElementById("date_radio").disabled = false; }
}
</script>
</HEAD>
<BODY>
<TABLE BORDER="1" BORDERCOLOR="#000000" CELLPADDING="2" CELLSPACING="0" ALIGN="center" CLASS="default_text" STYLE="border-collapse: collapse;">
<FORM ACTION="search.php" METHOD="POST">
<TR BGCOLOR="#ECE9D8">
<TD>
<B>Search</B>
</TD>
</TR>
<TR>
<TD VALIGN="top" ALIGN="right">
<INPUT TYPE="text" NAME="search_string" ID="search_box" CLASS="input_box" STYLE="width: 250px;" VALUE="447" SIZE="20">
<INPUT TYPE="submit" NAME="action" VALUE="Search" CLASS="input_button">
</TD>
</TR>
<TR>
<TD VALIGN="top" ALIGN="left">Test:
<INPUT TYPE="radio" NAME="test_type" VALUE="tabe" ID="tabe_test" onClick="check_test();" CHECKED>Tabe
<INPUT TYPE="radio" NAME="test_type" VALUE="iris" ID="iris_test" onClick="check_test();" >Iris
</TD>
</TR>
<TR>
<TD VALIGN="top" ALIGN="left">Type:
<INPUT TYPE="radio" NAME="search_type" VALUE="ssn" ID="ssn_radio" onClick="check_date();" CHECKED>SSN
<INPUT TYPE="radio" NAME="search_type" VALUE="name" ID="name_radio" onClick="check_date();" >Name
<INPUT TYPE="radio" NAME="search_type" VALUE="date" ID="date_radio" onClick="check_date();" >Date
</TD>
</TR>
<TR ID="date_row" style="display: none;">
<TD VALIGN="top" ALIGN="center">Date options:
<INPUT TYPE="radio" NAME="date_type" VALUE="before" CHECKED>Before
<INPUT TYPE="radio" NAME="date_type" VALUE="after" >After
</TD>
</TR>
</FORM>
</TABLE>
</BODY>
</HTML>