Ive got two checkboxes that when you click on either of them I want a textbox to apear on the same page. I have it working but its appearing on a different page!
<tr>
<td width=50%><font face=\'verdana\' size=\'2\'>Products Release Date:</font></td>
<td width=50%>
<input type=\"checkbox\" name=\"words\" onClick=\"return select_box(this);\">words</td>
</tr>
<tr>
<td width=50%> </td>
<td width=50%><input type=\"checkbox\" name=\"dates\" onClick=\"return select_box(this);\">dates</td>
</tr>
and then i have this as my java script code:
function select_box(thefield){
var myHTML=\'\';
myHTML1 = \'<select name=\"words\"><option value=\"\" selected>Please Select</option><option value=\"Available To Order\">Available To Order</option><option value=\"Back Order\">Back Order</option><option value=\"Discontinued\">Discontinued</option></select>\' ;
myHTML2 = \'<input type=\"text\" name=\"dates\" value=\"<?echo $date?>\">\' ;
var selectedField = thefield;
selectedValue = selectedField.name;
if(selectedValue==\"words\")
{
document.addform.document.write(myHTML1);
document.addform.document.close();
}
else if(selectedValue==\"dates\")
{
document.addform.document.write(myHTML2);
document.addform.document.close();
}
}
but unfortunatly my text box that I need gets open on a diffent page.
please help
Rooin,