This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/themes/default/blocks/product/product.js

50 lines
1.2 KiB
JavaScript
Raw Normal View History

2010-11-29 22:41:08 +00:00
function addCart(addtype,hosting) {
if (hosting == '1') {
var domain_option = document.getElementById('domain_option').value;
var domain_name = document.getElementById('domain_name').value;
var domain_tld = document.getElementById('domain_tld').value;
if (domain_option == '0') {
//@todo To Translate
alert("You must choose a 'Domain Transfer / Registration Option' to continue.");
return;
}
if ((domain_name == '0' || domain_tld == '0') && (domain_option != 'ip')) {
//@todo To Translate
alert("You must select a valid domain name to continue.");
return;
}
}
attrValidate(addtype);
}
function doCart(addtype) {
form = document.getElementById('view');
switch(addtype) {
case 'cart':
//document.getElementById('page').value = 'cart:admin_view';
document.getElementById('page').value = 'cart:cart';
break;
case 'login':
if (document.getElementById('wiz_username').value == '')
return;
if (document.getElementById('wiz_password').value == '')
return;
case 'register':
case 'checkout':
document.getElementById('page').value = 'checkout:checkout';
break;
default:
alert('Unknown addtype: '+addtype);
}
form.action = '';
form.submit();
}