Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help please~ Runtime error >_<!!!


windstrike

Recommended Posts

Hi, anyone can help me about this, i searched the whole forum... got no solutions for this...

 

After customer finishes checkout_shipping.php page, click continue then next is the checkout_payment.php page, but now problem comes out,

a js error pops up said

"

A Runtime Error has occurred. Do you wish to debug?

Line: 316 Error:

Object expected

"

so following this I find

"

<?php echo tep_draw_form('checkout_payment', tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', 'onsubmit="return check_form();"'); ?>

"

so that means I need to go check out the check_form() method, right? so I go and find the method in form_check.js.php

which is

"

function check_form(form_name) {

if (submitted == true) {

alert("<?php echo JS_ERROR_SUBMITTED; ?>");

return false;

}

 

error = false;

form = form_name;

error_message = "<?php echo JS_ERROR; ?>";

 

<?php if (ACCOUNT_GENDER == 'true') echo ' check_radio("gender", "' . ENTRY_GENDER_ERROR . '");' . "\n"; ?>

 

check_input("firstname", <?php echo ENTRY_FIRST_NAME_MIN_LENGTH; ?>, "<?php echo ENTRY_FIRST_NAME_ERROR; ?>");

check_input("lastname", <?php echo ENTRY_LAST_NAME_MIN_LENGTH; ?>, "<?php echo ENTRY_LAST_NAME_ERROR; ?>");

 

<?php if (ACCOUNT_DOB == 'true') echo ' check_input("dob", ' . ENTRY_DOB_MIN_LENGTH . ', "' . ENTRY_DATE_OF_BIRTH_ERROR . '");' . "\n"; ?>

 

check_input("email_address", <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH; ?>, "<?php echo ENTRY_EMAIL_ADDRESS_ERROR; ?>");

check_input("street_address", <?php echo ENTRY_STREET_ADDRESS_MIN_LENGTH; ?>, "<?php echo ENTRY_STREET_ADDRESS_ERROR; ?>");

check_input("postcode", <?php echo ENTRY_POSTCODE_MIN_LENGTH; ?>, "<?php echo ENTRY_POST_CODE_ERROR; ?>");

check_input("city", <?php echo ENTRY_CITY_MIN_LENGTH; ?>, "<?php echo ENTRY_CITY_ERROR; ?>");

 

<?php if (ACCOUNT_STATE == 'true') echo ' check_input("state", ' . ENTRY_STATE_MIN_LENGTH . ', "' . ENTRY_STATE_ERROR . '");' . "\n"; ?>

 

check_select("country", "", "<?php echo ENTRY_COUNTRY_ERROR; ?>");

 

check_input("telephone", <?php echo ENTRY_TELEPHONE_MIN_LENGTH; ?>, "<?php echo ENTRY_TELEPHONE_NUMBER_ERROR; ?>");

 

check_password("password", "confirmation", <?php echo ENTRY_PASSWORD_MIN_LENGTH; ?>, "<?php echo ENTRY_PASSWORD_ERROR; ?>", "<?php echo ENTRY_PASSWORD_ERROR_NOT_MATCHING; ?>");

check_password_new("password_current", "password_new", "password_confirmation", <?php echo ENTRY_PASSWORD_MIN_LENGTH; ?>, "<?php echo ENTRY_PASSWORD_ERROR; ?>", "<?php echo ENTRY_PASSWORD_NEW_ERROR; ?>", "<?php echo ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING; ?>");

 

if (error == true) {

alert(error_message);

return false;

} else {

submitted = true;

return true;

}

}

 

"

now, I can not find where it is wrong... can anyone help me ?? thanks a lot!!~~

 

>_<

 

btw, i installed sts on os2.2

Link to comment
Share on other sites

Hi, anyone can help me about this, i searched the whole forum... got no solutions for this...

 

After customer finishes checkout_shipping.php page, click continue then next is the checkout_payment.php page, but now problem comes out,

a js error pops up said

"

A Runtime Error has occurred. Do you wish to debug?

Line: 316 Error:

Object expected

"

so following this I find

"

<?php echo tep_draw_form('checkout_payment', tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', 'onsubmit="return check_form();"'); ?>

"

so that means I need to go check out the check_form() method, right? so I go and find the method in form_check.js.php

which is

"

function check_form(form_name) {

  if (submitted == true) {

    alert("<?php echo JS_ERROR_SUBMITTED; ?>");

    return false;

  }

 

  error = false;

  form = form_name;

  error_message = "<?php echo JS_ERROR; ?>";

 

<?php if (ACCOUNT_GENDER == 'true') echo '  check_radio("gender", "' . ENTRY_GENDER_ERROR . '");' . "\n"; ?>

 

  check_input("firstname", <?php echo ENTRY_FIRST_NAME_MIN_LENGTH; ?>, "<?php echo ENTRY_FIRST_NAME_ERROR; ?>");

  check_input("lastname", <?php echo ENTRY_LAST_NAME_MIN_LENGTH; ?>, "<?php echo ENTRY_LAST_NAME_ERROR; ?>");

 

<?php if (ACCOUNT_DOB == 'true') echo '  check_input("dob", ' . ENTRY_DOB_MIN_LENGTH . ', "' . ENTRY_DATE_OF_BIRTH_ERROR . '");' . "\n"; ?>

 

  check_input("email_address", <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH; ?>, "<?php echo ENTRY_EMAIL_ADDRESS_ERROR; ?>");

  check_input("street_address", <?php echo ENTRY_STREET_ADDRESS_MIN_LENGTH; ?>, "<?php echo ENTRY_STREET_ADDRESS_ERROR; ?>");

  check_input("postcode", <?php echo ENTRY_POSTCODE_MIN_LENGTH; ?>, "<?php echo ENTRY_POST_CODE_ERROR; ?>");

  check_input("city", <?php echo ENTRY_CITY_MIN_LENGTH; ?>, "<?php echo ENTRY_CITY_ERROR; ?>");

 

<?php if (ACCOUNT_STATE == 'true') echo '  check_input("state", ' . ENTRY_STATE_MIN_LENGTH . ', "' . ENTRY_STATE_ERROR . '");' . "\n"; ?>

 

  check_select("country", "", "<?php echo ENTRY_COUNTRY_ERROR; ?>");

 

  check_input("telephone", <?php echo ENTRY_TELEPHONE_MIN_LENGTH; ?>, "<?php echo ENTRY_TELEPHONE_NUMBER_ERROR; ?>");

 

  check_password("password", "confirmation", <?php echo ENTRY_PASSWORD_MIN_LENGTH; ?>, "<?php echo ENTRY_PASSWORD_ERROR; ?>", "<?php echo ENTRY_PASSWORD_ERROR_NOT_MATCHING; ?>");

  check_password_new("password_current", "password_new", "password_confirmation", <?php echo ENTRY_PASSWORD_MIN_LENGTH; ?>, "<?php echo ENTRY_PASSWORD_ERROR; ?>", "<?php echo ENTRY_PASSWORD_NEW_ERROR; ?>", "<?php echo ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING; ?>");

 

  if (error == true) {

    alert(error_message);

    return false;

  } else {

    submitted = true;

    return true;

  }

}

 

"

now, I can not find where it is wrong... can anyone help me ??  thanks a lot!!~~

 

>_<

 

btw, i installed sts on os2.2

find the what php page the error came up for and find line Line: 316 and have a close look at it or post it?

( WARNING )

I think I know what Im talking about.

BACK UP BACK UP BACK UP BACK UP

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...