Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

STS and custom javascript


Recommended Posts

Using Oscommerce 2.2 and STS 4.5.x I'm facing with a very strange (surely very basic) problem:


Different .php scripts at the osc root directory like checkout_payment.php or checkout_confirmation.php DO contain specific javascript insert in order to 1. check that a payment method is selected and 2. that the terms and general condition checkbox is checked.


All this stuff is done between the <head> and </head> tags in these files.


Unfortunately when I check the source code of these pages (generated using STS) I cannot see these scripts. It looks like if this specific html part of the file is just ignored.


Below I inserted the top part of the checkout_payment.php script and the result when this page is loaded into the browser. As you can see all the javascript is lost.


Am'I missing something very basic here?

Thanks for your support.







<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

<script language="javascript"><!--

var selected;


function selectRowEffect(object, buttonSelect) {

if (!selected) {

if (document.getElementById) {

selected = document.getElementById('defaultSelected');

} else {

selected = document.all['defaultSelected'];




if (selected) selected.className = 'moduleRow';

object.className = 'moduleRowSelected';

selected = object;


// one button is not an array

if (document.checkout_payment.payment[0]) {


} else {





function rowOverEffect(object) {

if (object.className == 'moduleRow') object.className = 'moduleRowOver';



function rowOutEffect(object) {

if (object.className == 'moduleRowOver') object.className = 'moduleRow';



<?php echo $payment_modules->javascript_validation(); ?>



HTML code received in the browser:



<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />


<title>cadeau region</title>



<script language="javascript"><!--

function popupWindow(url) {





<link href="/stylesheet.css" rel="stylesheet" type="text/css" />

<link href="/cadeauregion_construction.css" rel="stylesheet" type="text/css" />


<link href="/cadeauregion_style.css" rel="stylesheet" type="text/css" />






<!--mise en forme du fond -->

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...