PDA

View Full Version : Javascript & BTS



gamerigs
11-05-2005, 02:18 PM
I am trying to add a contribution called 'conditions of use'. It only has two pieces of code that a added to the /catalog/checkout_confirmation.php in a oscommerce install. I am trying to add it to osmax install and can't get the Javascript check to work. I do not know where to locate it in a osmax
install. I have tried main_page.tpl.php, checkout_confirmation.tpl.php and checkout_confirmation.php but the javascipt doesn't do its check? Where do you store Javascript with a BTS install?

It says to add this to checkout_confirmation.php

<!--Start AGB confirmation script -->

<SCRIPT LANGUAGE="JavaScript">
function checkCheckBox(f){
if (f.agree.checked == false )
{
alert('<?php echo CONDITION_AGREEMENT_WARNING; ?>');
return false;
}else
return true;
}
</script>

<!--Start AGB confirmation script -->


<!--Start AGB Agreement form -->

<?php echo CONDITION_AGREEMENT; ?> <input type="checkbox" value="0" name="agree">

<!--Ende AGB Agreement form -->

jpf
11-06-2005, 09:52 AM
Which version of AGB did you have? Can't see this code....

gamerigs
11-06-2005, 12:20 PM
Which version of AGB did you have? Can't see this code....

It is this contribution here

http://www.oscommerce.com/community/contributions,219/category,all/search,Maik+Caro

It makes a check box in checkout_confirmation and has a piecei of javascript validate it has be ticked. I don't know where to put the javascript becuase it is oscmax not oscommerce. Do you know where I should put the javacript so that the warning message will come up if they do not tick the box?