princessk1
Programmer
I am calling a sub that checks if the value in the text box is numeric, on the onclick event of the submit button. If the value is not numeric, is it possible to cancel the action on the form so it doesn't go to the next page?
Is it also possible to load a page without having to click on a button or link?
Here is the code:
<form name = SaveSales action = "SaveSales.asp" action = "GET">
<tr>
<td align = right>
<b>Please enter the amount of sales for the new store:
</b></td>
<td align = left>
<input type = "text" name = "sales" size=20>
</td>
</tr>
</table>
<center>
<table border = 0 width = 100%>
<tr align = center>
<td>
<input type = "Submit" value = "Save Sales Amount"
onclick = CheckNumber>
</form>
</td>
</tr>
</table>
</center>
<br><br>
</form>
<center><a href="Generate.asp" title = "Back to
Splits">Back to Splits</a></center>
Is it also possible to load a page without having to click on a button or link?
Here is the code:
<form name = SaveSales action = "SaveSales.asp" action = "GET">
<tr>
<td align = right>
<b>Please enter the amount of sales for the new store:
</b></td>
<td align = left>
<input type = "text" name = "sales" size=20>
</td>
</tr>
</table>
<center>
<table border = 0 width = 100%>
<tr align = center>
<td>
<input type = "Submit" value = "Save Sales Amount"
onclick = CheckNumber>
</form>
</td>
</tr>
</table>
</center>
<br><br>
</form>
<center><a href="Generate.asp" title = "Back to
Splits">Back to Splits</a></center>