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/cart.js

42 lines
1.2 KiB
JavaScript
Raw Normal View History

2009-08-03 04:10:16 +00:00
function domainUpdate(domain,tld,type) {
document.getElementById("domain_name").value = domain;
document.getElementById("domain_tld").value = tld;
document.getElementById("domain_option").value = type;
}
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") {
if(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');
if(addtype == 'cart') {
//document.getElementById('page').value = 'cart:admin_view';
document.getElementById('page').value = 'cart:cart';
} else if(addtype == 'checkout') {
document.getElementById('page').value = 'checkout:checkout';
}
form.action = '';
form.submit();
}