...

View Full Version : My form cannot be found?



xlegendx
07-06-2006, 05:21 AM
Hey,
I got the following code:

<form method="POST" action="?p_id=32765" name="RegisterForm">

<table border="0" width="550" cellspacing="0" cellpadding="0" style="padding-bottom: 3px">
<tr>
<td width="402" style="padding-bottom: 8px"> <font size="2">Username</font><br>
<font size="1">The username that you will login on this site with.</font></td>
<td width="148" style="padding-bottom: 8px"> <input type="text" name="reg_user" size="20" class="text_box"></td>
</tr>
<tr>

<td width="402" style="background-color: #DCDBCD"> <font size="2">Password</font><br>
<font size="1">Enter your password <b>twice</b>.</font></td>
<td width="148" style="background-color: #DCDBCD"> <input type="password" name="reg_pass1" size="20" class="text_box"><br>
<input type="password" name="reg_pass2" size="20" class="text_box"></td>
</tr>
<tr>

<td width="500" colspan="2" height="34" valign="bottom"> <b>
<font size="2">The information below is <font color="#FF0000">optional</font></font></b></td>
</tr>
<tr>
<td width="402" style="padding-bottom: 8px"> <font size="2">Email</font><br>
<font size="1">Your email address will not be used for any kind of spam
mails or nothing.</font></td>

<td width="148" style="padding-bottom: 8px"> <input type="text" name="reg_email" size="20" class="text_box"></td>
</tr>
<tr>
<td width="402" style="padding-bottom: 8px; background-color: #DCDBCD"> <font size="2">Name</font><br>
<font size="1">Please enter your full name.</font></td>
<td width="148" style="padding-bottom: 8px; background-color: #DCDBCD"> <input type="text" name="reg_name" size="20" class="text_box"></td>

</tr>
<tr>
<td width="402" style="padding-bottom: 8px"> <font size="2">Birthday</font><br>
<font size="1">Please enter your birthday in the current format: <b>
Year-Month-Day</b></font></td>
<td width="148" style="padding-bottom: 8px">
<input type="text" name="reg_bd" size="20" value="YYYY-MM-DD" class="text_box"></td>

</tr>
<tr>
<td width="402" style="padding-bottom: 8px; background-color: #DCDBCD"> <font size="2">Location</font><br>
<font size="1">Where you live.</font></td>
<td width="148" style="padding-bottom: 8px; background-color: #DCDBCD"> <input type="text" name="reg_location" size="20" class="text_box"></td>
</tr>
<tr>

<td width="402" style="padding-bottom: 8px"> <font size="2">Interests</font><br>
<font size="1">Your interests.</font></td>
<td width="148" style="padding-bottom: 8px"> <input type="text" name="reg_interests" size="20" class="text_box"></td>
</tr>
<tr>
<td width="402" style="padding-bottom: 8px; background-color: #DCDBCD"> <font size="2">Occupations</font><br>

<font size="1">What you do in your life.</font></td>
<td width="148" style="padding-bottom: 8px; background-color: #DCDBCD"> <input type="text" name="reg_occupations" size="20" class="text_box"></td>
</tr>
<tr>
<td width="402" style="padding-bottom: 8px"> <font size="2">Homepage</font><br>
<font size="1">Your website address. Be sure to enter &quot;<b>http://</b>&quot;
at the beginning.</font></td>

<td width="148" style="padding-bottom: 8px">
<input type="text" name="reg_homepage" size="20" value="http://www.yourwebsite.com" class="text_box"></td>
</tr>
<tr>
<td width="402" style="padding-bottom: 8px; background-color: #DCDBCD"> <font size="2">AIM ID</font><br>
<font size="1">AOL Instant Messenger</font></td>
<td width="148" style="padding-bottom: 8px; background-color: #DCDBCD"> <input type="text" name="reg_aim" size="20" class="text_box"></td>

</tr>
<tr>
<td width="402" style="padding-bottom: 8px"> <font size="2">MSN Email</font><br>
<font size="1">MSN Messenger</font></td>
<td width="148" style="padding-bottom: 8px"> <input type="text" name="reg_msn" size="20" class="text_box"></td>
</tr>
<tr>

<td width="402" style="padding-bottom: 8px; background-color: #DCDBCD"> <font size="2">ICQ #</font><br>
<font size="1">Your ICQ user ID.</font></td>
<td width="148" style="padding-bottom: 8px; background-color: #DCDBCD"> <input type="text" name="reg_icq" size="20" class="text_box"></td>
</tr>
<tr>
<td width="402" style="padding-bottom: 8px"> <font size="2">YIM ID</font><br>

<font size="1">Yahoo Messenger</font></td>
<td width="148" style="padding-bottom: 8px"> <input type="text" name="reg_yim" size="20" class="text_box"></td>
</tr>
</table>
<div style="padding-left: 5px; padding-bottom: 5px; text-align: center" class="font_note">
<a href="javascript:document.RegisterForm.submit();">Create this account</a>
</div>

</form>

The problem is that when I click Create this account it says:
"A Runtime Error has occured.
Do you wish to Debug?

Line: 0
Error: 'document.RegisterForm' is null or not an object"

Can someone tell me whats wrong? Thanks.

felgall
07-06-2006, 12:20 PM
Try attaching your Javascript to event handlers and see if that helps. A lot of Javascript doesn't work when attached to href=

xlegendx
07-06-2006, 02:41 PM
Try attaching your Javascript to event handlers and see if that helps. A lot of Javascript doesn't work when attached to href=

The weird thing is that I use the SAME code for my "Modify User Information" page. I just copied the modify user information and renamed all things to register and change my PHP code a bit. It's weird!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum