...

View Full Version : name field required?



sphinx1994
07-17-2009, 06:17 PM
Hello,

Herre is my shoutbox:

http://drugspolicy.co.cc/445/shoutbox.inc.php

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

Thanks

Philip M
07-17-2009, 06:31 PM
Forbidden
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.

sphinx1994
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.

sphinx1994
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">
<td>
<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>

</tr><tr>
<!-- <td class="cssShoutText">eMail:</td>-->
<!--<td align="right"><input type="text" name="sbEMail" maxlength="75" class="cssShoutForm" style="width:124px"></td>
</tr>--><tr>
<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>
</tr></table>

<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></table>
</td>
</tr></table>

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

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

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

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum