View Full Version : Runtime error when creating account

09-19-2003, 09:15 AM
I'm pretty new to osCommerce. I love it but now I've got a problem that wasn't there from the beginning. When creating a new account: The State box does Not have a drop-down menu. Then, when I submit I get a runtime error on line 211:

<form name="create_account" action="http://www.dotcom-solutions.com/catalog/create_account.php" method="post" onSubmit="return check_form(create_account);"><input type="hidden" name="osCsid" value="2120a7bb137edb3e72c3d109971c17ca" /><input type="hidden" name="action" value="process"><table border="0" width="100%" cellspacing="0" cellpadding="0">
If I don't debug it sends me back to the create account page telling me I have to choose a state from the drop down menu. This time the State field IS a drop down menu. I select a state but I still get the run-time error. Accounts are being created successfully. Please help! I've re-uploaded the creat_account.php file. I've looked for account_details.php but can't find it under \includes nor in my original files.

This may be two unrelated issues.... don't know anymore.



09-20-2003, 07:15 PM
I just checked this out on my Linux box where I first installed osCommerce to try it out (AABOX version) and it does the same thing. I guess it never worked for me I just thought it did. Any suggestions would be great. I could reinstall it but since it's messed up on the original it will probably be messed up again. I checked my CHMOD settings on the catalog/includes folder and it's 755. I've re-uploaded includes/create_account.php and Templates/create_account.tpl.php.


09-29-2003, 03:25 PM
Okay. I've gotten no responses yet but here's some more info. I just completely deleted my Catalog directory. I download version 1.5 and installed it and I'm getting the same thing. It may be a problem with the form_checker.js.php file.

I looked on the osCommerce Demo Store and it's messed up with the state/drop-down menu too. You have to type in the state, but when you click to submit, it comes back and tells you to choose a state from the drop-down menu.

Has anyone else had problems with this?



09-29-2003, 04:59 PM
I cannot duplicate this error in MS2-MAX. I have not seen it, and judging from the lack of response, others have not seen it either. I will look and see if I can find any more on this for you.

12-15-2003, 03:11 PM
Has anyone else run into this error? I have one other person who has, but that is it. And I can find no problem. This is a javascript error, but I cannot reproduce it on any of my computers...

12-15-2003, 06:20 PM
I do not get this error, but I do not have a drop down fro State either. It is a normal Ms2-Max but I changed the order of fields to fit US standards.

Good luck!

01-14-2004, 10:15 AM
Confirm this problem with OSCMax 1.5 in IE 5.5 and 6.0 but not Mozilla Firebird .7

However, when I tried to reproduce it again after deleting the user it didnt error, even thought it did it several times previous with no changes.

Any ideas?

07-03-2004, 08:56 AM
My setup is a new install of MAX with php 4.2.3 on IIS using IE6 SP1 and I'm getting the javascript runtime error "object required" when the continue button is clicked in the create_account page.php page. I've traced it to the following line in the form tag:

onSubmit="return check_form(create_account);"

Not sure where this function is; if I search for 'function check_form' I find the following occurances:

includes\k.js.php(95): function check_form(form_name)
includes\javascript\advanced_search.js(3): function check_form()
includes\javascript\form_check.js.php(95): function check_form(form_name)
includes\classes\payment.php(100): 'function check_form()

07-03-2004, 09:18 AM
Think I at one time saw this myself, seemed to me it was related to security settings in IE. To be honest i cant remember now.

07-03-2004, 04:39 PM
After a couple of pints of beer I think I've worked this out! If you open create_account.php in Mozilla and click continue with no fields completed then it doesn't create a javascript error and the uncompleted field warnings are shown in red at the top of the page. However if you open Mozilla's Javascript debug console, access the same page in IE6 and click continue then the console reports "Error: check_form is undefined"

If in file create_account.tpl.php you type:


echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onSubmit="return check_form(create_account);"') . tep_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

then refresh the page and click continue, then up pops a dialogue message with the warnings about the empty fields.

So It seems that the following can be removed from the first line of code in create_account.tpl.php

, 'onSubmit="return check_form(create_account);"'
since the form checking is handled by create_account.php rather than the javascript function check_form.