hey guys just a quickie,
I want textboxes to appear only when the user clicks a checkbox. The code i have doesnt work (it never does

)
javascript
function searchAuthor() {
var checkbox = window.document.form2.check_1;
if (checkbox == false) {
window.document.writeln("<tr><td>Please enter the author of the book you wish to search for:</td>")
window.document.writeln("<td><INPUT TYPE=text ID=author NAME=author></td></tr>")
}
}
the form
<FORM NAME=form METHOD=get ACTION="./myass.htm" onSubmit="return check()">
<TABLE>
<tr>
<td>
Please enter the title of the book you wish to search for:
</td>
<td>
<INPUT TYPE=text ID=title NAME=title>
</td>
</tr>
<tr><td>
<input type="checkbox" name ="check_1" onClick="searchAuthor();">Search by Author
</td></tr>
<tr>
<td>
 
</td>
<td>
<INPUT id=reset type=reset value=Reset name=reset>
<INPUT id=submit type=submit value=Submit name=submit>
</td>
</tr>
</TABLE>
</FORM>
Any ideas?