Better explained:
When a user loads my page there is a contact form and they have to fill in all text boxes. If they click submit and a text box is empty above the text box new text will appear telling the user that they forget to fill in that text box.
Heres the code I'm currently using:-
Code:
<script language="javascript">
function DoSubmit ()
{
if (document.form.ticket.value == "") {
alert ("Enter your support ticket!");
document.form.ticket.focus ();
return "";
}
document.form.submit ();
}
</script>
Please enter your support ticket.<Br><Br>
<form method="post" action="viewticket.php" name="form">
<input type="text" name="ticket" size="20" maxlength="10"><BR>
<input type="hidden" name="mode" value="submit">
<input type="button" onclick="DoSubmit ()" value="Check Status">
<BR><BR>
I don't want it to be an alert box.
Bookmarks