Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    My form cannot be found?

    Hey,
    I got the following code:
    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.

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,639
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Try attaching your Javascript to event handlers and see if that helps. A lot of Javascript doesn't work when attached to href=
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by felgall
    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!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •