View Full Version : name field required?

07-17-2009, 06:17 PM

Herre is my shoutbox:


Basicly, I want a popup box to say "You must have a name" if they try and send a message with no name.


Philip M
07-17-2009, 06:31 PM
You don't have permission to access /445/shout.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

07-17-2009, 06:54 PM
yer, ive done that purposefully, since i dont think its needed to make this work i just need an alert box to pop up if you click shout without anything in the email field.

07-17-2009, 06:56 PM
here is come code:

<body bgcolor="#3399FF">
<table border="0" cellspacing="0" cellpadding="0">
<form name="fShout" action="/445/shout.php" target="ShoutBox" method="post">
<input type="hidden" name="sbID" value="">
<input type="hidden" name="admin">
<tr valign="top">
<table border="0" cellspacing="0" cellpadding="0" width="190"><tr>
<td class="cssShoutText">Name:</td>
<td align="right"><input type="text" name="sbName" maxlength="20" class="cssShoutForm" style="width:124px"></td>

<!-- <td class="cssShoutText">eMail:</td>-->
<!--<td align="right"><input type="text" name="sbEMail" maxlength="75" class="cssShoutForm" style="width:124px"></td>
<td colspan="2">
<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
<td class="cssShoutText">Message:</td>
<td align="right"><input type="button" value="Smilies" class="cssShoutButton" onClick="newWindow('/445/smilies.php', 130, 300, 0, 0, 1)"></td>

<textarea name="sbText" rows="3" style="width:190px; height:50px" wrap="virtual" class="cssShoutForm"></textarea>
<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
<td><input type="button" name="Refresh" value="Refresh" class="cssShoutButton" onClick="this.disabled=true; refreshBox()"></td>
<td align="center"><input type="button" name="Admin" value="Admin" class="cssShoutButton" onClick="this.disabled=true; login()"></td>
<td align="right"><input type="button" name="Shout" value="Shout!" class="cssShoutButton" onClick="this.disabled=true; shoutIt()"></td>

</tr><td height="10"></td><tr>
<iframe name="ShoutBox" src="/445/shout.php" class="cssShoutBox"
width="190" height="300" frameborder="0"></iframe>

Philip M
07-17-2009, 06:58 PM
What do you mean by "not anything"? Will a space or a ? or "Mickey Mouse" suffice?

07-17-2009, 07:02 PM
I mean if they leave the field blank

07-17-2009, 07:42 PM
You'll be interested in adding an onsubmit to the form, I think.