Hi guys..I'm back
I now have the following; (I didn't include everything, cos it would get too long, as there are 20+ boxes and buttons)
<script>
var linesAdded1 = 0;
function BoxAddtext1(txt) {
if (linesAdded1 < 8) {
document.ThisForm.box1.value += txt + '\n'
linesAdded1++
} else {
alert('You have entered more than 8 entries for table 1...sorry.')
}
}</script>
<input type="button" name="box0_1button" value="1" onclick="BoxAddtext1('etetet test4'); document.ThisForm.box0_1button.disabled=true;document.ThisForm.box0_2button.disabled=true;document.ThisForm.box0_3button.disabled=true;document.ThisForm.box0_4button.disabled=true;document.ThisForm.maintable0.disabled=true;" style="font-size: 10px; font-family: Tahoma; border: 1px solid #008000">
<table border="0" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1" height="539">
<tr>
<td width="33%" align="center" height="68">
<font face="Tahoma" size="2">Head Table<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="headtable" cols="26" readonly></textarea></td>
<td width="33%" align="center" height="68">
<font face="Tahoma" size="2">Table 1<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box1" cols="26" readonly></textarea></td>
<td width="34%" align="center" height="68">
<font face="Tahoma" size="2">Table 2<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.<br>
</font>
<textarea rows="4" name="box2" cols="26" readonly></textarea></td>
</tr>
<tr>
<td width="33%" align="center" height="70">
<font face="Tahoma" size="2">Table 3<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box3" cols="26" readonly></textarea></td>
<td width="33%" align="center" height="70">
<font face="Tahoma" size="2">Table 4<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box4" cols="26" readonly></textarea></td>
<td width="34%" align="center" height="70">
<font face="Tahoma" size="2">Table 5<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box5" cols="26" readonly></textarea></td>
</tr>
<tr>
<td width="33%" align="center" height="68">
<font face="Tahoma" size="2">Table 6<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box6" cols="26" readonly></textarea></td>
<td width="33%" align="center" height="68">
<font face="Tahoma" size="2">Table 7<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box7" cols="26" readonly></textarea></td>
<td width="34%" align="center" height="68">
<font face="Tahoma" size="2">Table 8<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box8" cols="26" readonly></textarea></td>
</tr>
<tr>
<td width="33%" align="center" height="68">
<font face="Tahoma" size="2">Table 9<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box9" cols="26" readonly></textarea></td>
<td width="33%" align="center" height="68">
<font face="Tahoma" size="2">Table 10<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box10" cols="26" readonly></textarea></td>
<td width="34%" align="center" height="68">
<font face="Tahoma" size="2">Table 11<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box11" cols="26" readonly></textarea></td>
</tr>
<tr>
<td width="33%" align="center" height="68">
<font face="Tahoma" size="2">Table 12<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box12" cols="26" readonly></textarea></td>
<td width="33%" align="center" height="68">
<font face="Tahoma" size="2">Table 13<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box13" cols="26" readonly></textarea></td>
<td width="34%" align="center" height="68">
<font face="Tahoma" size="2">Table 14<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box14" cols="26" readonly></textarea></td>
</tr>
<tr>
<td width="33%" align="center" height="68">
<font face="Tahoma" size="2">Table 15<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box15" cols="26" readonly></textarea></td>
<td width="33%" align="center" height="68">
<font face="Tahoma" size="2">Table 16<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box16" cols="26" readonly></textarea></td>
<td width="34%" align="center" height="68">
<font face="Tahoma" size="2">Table 17<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box17" cols="26" readonly></textarea></td>
</tr>
<tr>
<td width="33%" align="center" height="62">
<font face="Tahoma" size="2">Table 18<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box18" cols="26" readonly></textarea></td>
<td width="33%" align="center" height="62">
<font face="Tahoma" size="2">Table 19<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box19" cols="26" readonly></textarea></td>
<td width="34%" align="center" height="62"><font face="Tahoma" size="2">
Table 20<br>
</font><font face="Tahoma" size="1" color="#FFFFFF">.</font><br>
<textarea rows="4" name="box20" cols="26" readonly></textarea></td>
</tr>
<tr>
<td width="33%" align="center" height="19"> </td>
<td width="33%" align="center" height="19"> </td>
<td width="34%" align="center" height="19"> </td>
</tr>
</table>
<p align="center">
<input type="submit" value="Save" name="B1"> <input type="reset" value="Reset" name="B2"></p>
</form>
<center>
<p><font face=Tahoma size=2> < <a href="index.php?action=table_planner">
Back to Table Planner</a> ></font></p>
</center></p>
</td></tr></table>
The problem is, that when I the user gets the alert() box appear, it still blanks out the buttons. Is there something I could add into the <script></script> stuff, that would stop it in its tracks, and not blank out the buttons appropriatly? I've tried adding;
return false
and
exit
but the first one does't seem to do anything, and the other one gives a JS error
Any ideas?
TIA.
Andy