disable button if textbox contain value
this is the code page that will contain two textbox (subject,section)
and two button(update record,delete)--delete will empty the textbox value =''
this is my update page(dbUpdate.asp)
disable the two button if both the textbox contain value inside it!
--------------------------------------------------------------------
<tr>
<td width="31%" height="28" align="center">
<p align="right"><b><font face="Verdana" size="2">
Subject :</font></b>
</td>
<td width="69%" height="28" align="center">
<div align="left"><b><font face="Verdana" size="2">
<input id="subject" name="subject" value="<%=(Recordset1.Fields.Item("subject").Value)%>" size="32" style="float: left"> </font></b></div>
</td>
</tr>
<tr>
<td width="39%" height="28" align="center">
<p align="right"><b><font face="Verdana" size="2">
Section :</font></b>
</td>
<td width="61%" height="28" align="center">
<div align="left"><b><font face="Verdana" size="2">
<input id="section" name="section" value="<%=(Recordset1.Fields.Item("section").Value)%>" size="32" style="float: left">
</font></b></div>
</td>
</tr>
<tr>
<td width="100%" height="28" align="center" colspan="2">
<b><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> </font></b>
</td>
</tr>
<tr>
<td width="100%" height="28" align="center" colspan="2">
<b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
<input type="submit" value="Update Record" name="submit">
<!--JAVASCRIPT TEXTBOX CHANGER-->
<input type="button" value="Delete Record" name="delete" a href="#" onClick="document.getElementById('subject').value =''; document.getElementById('section').value = '';">
</font></b>
<!--JAVASCRIPT TEXTBOX CHANGER END-->
</td>
</tr>
When the textbox "Subject" and "Section" are empty, contain no value, then display the "Update Record" button!
Else if the textbox "Subject" and "Section" contain a value/ data, then disable the "Update Record" and "Delete" button
and display a "BACK" button to go back to previous page!
can you show me step by step
if posible, i want to know the <HEAD> script as well, please