Help with Firefox compatibility

  • Thread starter Craig Keightley
  • Start date
C

Craig Keightley

Please help, i have attached my page which worksin IE but i cannnot get the
drop down menu to fucntion in firefox. Any one have any ideas why?

Many Thanks

Craig

<<<<<<<<<<<<<<CODE>>>>>>>>>>>>>>>>

<html>

<head>
<title>Rackage Servers - Is your server Rackage?</title>
<style>
p
{margin: 0;}

body
{margin: 0;}

</style>
<style type="text/css">

#dhtmltooltip{
position: absolute;
left: -300px;
width: 150px;
border: 2px solid #86A1BC;
padding: 2px;
background-color: transparent;
background-image: url('blue85alpha.png');
background-repeat: repeat;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=85);
-moz-opacity: 0.80;

visibility: hidden;
z-index: 100
}

#dhtmlpointer{
position:absolute;
left: -300px;
z-index: 101;
visibility: hidden;
}

H1 {
PADDING-RIGHT: 0px; DISPLAY: block; PADDING-LEFT: 0px; FONT-WEIGHT: bolder;
FONT-SIZE: 18px; LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px 0px 5px; WIDTH:
99.99%; COLOR: #eeedef; PADDING-TOP: 3px; POSITION: relative; TEXT-ALIGN:
left
}

H2 {
PADDING-RIGHT: 0px; DISPLAY: block; PADDING-LEFT: 0px; FONT-WEIGHT: bolder;
FONT-SIZE: 13px; LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px 0px 5px; WIDTH:
99.99%; COLOR: #eeedef; PADDING-TOP: 3px; POSITION: relative; TEXT-ALIGN:
left
}

</style>
<script src="scripts/NumberFormat.js" type="text/javascript"></script>

<script src="hover.js" type="text/javascript"></script>
<script language="javascript">

function format_currency( fAmount ){
var numberTest = new NumberFormat(fAmount);
numberTest.setCurrency(false);
numberTest.setCommas(false);
numberTest.setPlaces(2);
var POUND = unescape('%A3');
numberTest.setCurrencyPrefix(POUND);
return(numberTest.toFormatted());
}


function hint(sHint) {
document.getElementById("hinttext").innerHTML = sHint;
}
function showPackage() {
resetOptions();
var setUpTxt = document.getElementById("cust_setup_text");
var setUpPrice = document.getElementById("cust_setup_price");
var basePrice = document.getElementById("basePrice");
var setUpValue = document.getElementById("setUp").value;
var netPriceValue = document.getElementById("netPrice");
var serverID = document.getElementById("packageRef").value;
var serverName = document.getElementById("packageRef");
var serverText = serverName.options[serverName.selectedIndex].text;
var packageName = document.getElementById("package_name");
var hddPrice = document.getElementById("hddPrice").value;
var ramPrice = document.getElementById("ramPrice").value;
var netPrice = document.getElementById("net_price");
var cpuText = document.getElementById("cpu_text");
var ramText = document.getElementById("ram_text");
var hddText = document.getElementById("hdd_text");
var osText = document.getElementById("os_text");
var priceText = document.getElementById("price_text");
var cpu =document.getElementById("cpu");
var ram = document.getElementById("ram");
var hdd = document.getElementById("hdd");
var os = document.getElementById("os");
var price =document.getElementById("price");
var custom = document.getElementById("custom").value;
var basePriceValue = '70.00'
var helpText1 = '<table cellpadding=0 cellspacing=0 ><tr><td
class=&quot;order_text&quot; valign=&quot;top&quot;>The processor is the
engine behind the server, choose one which will be able to cope with all the
applications that you will require of it.</td><td
class=&quot;order_text&quot; width=&quot;105&quot; height=&quot;34&quot;
align=&quot;center&quot;></td></tr></table>'; //cpu
var helpText2 = '<table cellpadding=0 cellspacing=0 ><tr><td
class=&quot;order_text&quot; valign=&quot;top&quot;>You need extra Ram
resources to be able to run the server smoothly, less ram means writing to
hard drive which slows performance. 1 gig min recommended</td><td
class=&quot;order_text&quot; width=&quot;105&quot; height=&quot;34&quot;
align=&quot;center&quot;></td></tr></table>'; //ram
var helpText3 = '<table cellpadding=0 cellspacing=0 ><tr><td
class=&quot;order_text&quot; valign=&quot;top&quot;>Hard disk drives
capacity is not a problem with modern drives, but for safety we advise
running 2 drives for raid 1. You will never lose data with this
configuration. </td><td class=&quot;order_text&quot; width=&quot;105&quot;
height=&quot;34&quot; align=&quot;center&quot;></td></tr></table>'; //hdd
var helpText4 = '<table cellpadding=0 cellspacing=0 ><tr><td
class=&quot;order_text&quot; valign=&quot;top&quot;>Choose which operating
system you wish to use on your server, remember that some games will release
servers / patches for windows much earlier that for Linux. It is advisable
to choose the operating system that you are most comfortable with.</td><td
class=&quot;order_text&quot; width=&quot;105&quot; height=&quot;34&quot;
align=&quot;center&quot;></td></tr></table>'; //os
var setUp = document.getElementById("setUp");
packageName.innerHTML = serverText;
cpu.innerHTML = '<strong>Minimum CPU </strong>';
ram.innerHTML = '<strong>Minimum RAM </strong>';
hdd.innerHTML = '<strong>Minimum HDD </strong>';
os.innerHTML = '<strong>Operating System </strong>';
price.innerHTML = '<strong>Price :</strong>';
switch(serverID){
case "1" :
basePrice.value= 0;
setUpTxt.innerHTML = '';
setUpPrice = '';
setUpValue = 0;
resetOptions();
setUp.value = 0;
cpuText.innerHTML='<IMG SRC="files/cpu/p4.jpg" align="right"><img
src="/images/help_off.gif" alt="what is this?" name="help" width="18"
height="18" border="0" align="middle"
onMouseover="ddrivetip(\''+helpText1+'\', 300)"
onMouseout="hideddrivetip()">&nbsp;Intel Pentium 4 HT (3.00 Ghz)';
ramText.innerHTML = '<img src="/images/help_off.gif" alt="what is this?"
name="help" width="18" height="18" border="0" align="middle"
onMouseover="ddrivetip(\''+helpText2+'\', 300)"
onMouseout="hideddrivetip()">&nbsp;Low (512 MB)';
hddText.innerHTML='<img src="/images/help_off.gif" alt="what is this?"
name="help" width="18" height="18" border="0" align="middle"
onMouseover="ddrivetip(\''+helpText3+'\', 300)"
onMouseout="hideddrivetip()">&nbsp;Low (40 GB)';
osText.innerHTML = '<IMG SRC="files/os/server_winxp.gif"
align="right"><img src="/images/help_off.gif" alt="what is this?"
name="help" width="18" height="18" border="0" align="middle"
onMouseover="ddrivetip(\''+helpText4+'\', 300)"
onMouseout="hideddrivetip()">&nbsp;Windows XP ';
priceText.innerHTML = '£123.00';
//netPrice.value ='123.00';
netPrice.innerHTML = '£123.00';
netPriceValue.value = 123.00;
showPayment();
updateTotals();
setTextValues('Windows XP','Hard Disk: Low (40 GB)','Ram: Low (512
MB)','Intel Pentium 4 HT (3.00 Ghz)')
break;
case "2" :
basePrice.value= 0;
setUpTxt.innerHTML = '';
setUpPrice = '';
setUpValue = 0;
resetOptions();
setUp.value = 0;
cpuText.innerHTML='<IMG SRC="files/cpu/a64.jpg" align="right"><img
src="/images/help_off.gif" alt="what is this?" name="help" width="18"
height="18" border="0" align="middle"
onMouseover="ddrivetip(\''+helpText1+'\', 300)"
onMouseout="hideddrivetip()">&nbsp;AMD Athlon 64 3200 (3.20 Ghz)';
ramText.innerHTML = '<img src="/images/help_off.gif" alt="what is this?"
name="help" width="18" height="18" border="0" align="middle"
onMouseover="ddrivetip(\''+helpText2+'\', 300)"
onMouseout="hideddrivetip()">&nbsp;Medium (1024 MB)';
hddText.innerHTML='<img src="/images/help_off.gif" alt="what is this?"
name="help" width="18" height="18" border="0" align="middle"
onMouseover="ddrivetip(\''+helpText3+'\', 300)"
onMouseout="hideddrivetip()">&nbsp;Middle (120 GB)';
osText.innerHTML = '<IMG SRC="files/os/server_win2000.gif"
align="right"><img src="/images/help_off.gif" alt="what is this?"
name="help" width="18" height="18" border="0" align="middle"
onMouseover="ddrivetip(\''+helpText4+'\', 300)"
onMouseout="hideddrivetip()">&nbsp;Windows 2000 ';
priceText.innerHTML = '£100.00';
//netPrice.value ='100.00';
netPrice.innerHTML = '£100.00';
netPriceValue.value = 100.00;
showPayment();
updateTotals();
setTextValues('Windows 2000','Hard Disk: Middle (120 GB)','Ram: Medium
(1024 MB)','AMD Athlon 64 3200 (3.20 Ghz)')
break;
case "3" :
basePrice.value= 0;
setUpTxt.innerHTML = '';
setUpPrice = '';
setUpValue = 0;
resetOptions();
setUp.value = 0;
cpuText.innerHTML='<IMG SRC="files/cpu/xeonDC.jpg" align="right"><img
src="/images/help_off.gif" alt="what is this?" name="help" width="18"
height="18" border="0" align="middle"
onMouseover="ddrivetip(\''+helpText1+'\', 300)"
onMouseout="hideddrivetip()">&nbsp;Intel Xeon Paxville (3.40 Ghz)';
ramText.innerHTML = '<img src="/images/help_off.gif" alt="what is this?"
name="help" width="18" height="18" border="0" align="middle"
onMouseover="ddrivetip(\''+helpText2+'\', 300)"
onMouseout="hideddrivetip()">&nbsp;Medium (1024 MB)';
hddText.innerHTML='<img src="/images/help_off.gif" alt="what is this?"
name="help" width="18" height="18" border="0" align="middle"
onMouseover="ddrivetip(\''+helpText3+'\', 300)"
onMouseout="hideddrivetip()">&nbsp;Middle (120 GB)';
osText.innerHTML = '<IMG SRC="files/os/server_freebsd.gif"
align="right"><img src="/images/help_off.gif" alt="what is this?"
name="help" width="18" height="18" border="0" align="middle"
onMouseover="ddrivetip(\''+helpText4+'\', 300)"
onMouseout="hideddrivetip()">&nbsp;Free BSD ';
priceText.innerHTML = '£99.00';
//netPrice.value ='99.00';
netPrice.innerHTML = '£99.00';
netPriceValue.value = 99.00;
showPayment();
updateTotals();
setTextValues('Free BSD','Hard Disk: Middle (120 GB)','Ram: Medium (1024
MB)','Intel Xeon Paxville (3.40 Ghz)')
break;
case "4" :
basePrice.value= 0;
setUpTxt.innerHTML = '';
setUpPrice = '';
setUpValue = 0;
resetOptions();
setUp.value = 0;
cpuText.innerHTML='<IMG SRC="files/cpu/pd.jpg" align="right"><img
src="/images/help_off.gif" alt="what is this?" name="help" width="18"
height="18" border="0" align="middle"
onMouseover="ddrivetip(\''+helpText1+'\', 300)"
onMouseout="hideddrivetip()">&nbsp;Intel Pentium D 840 (3.20 Ghz)';
ramText.innerHTML = '<img src="/images/help_off.gif" alt="what is this?"
name="help" width="18" height="18" border="0" align="middle"
onMouseover="ddrivetip(\''+helpText2+'\', 300)"
onMouseout="hideddrivetip()">&nbsp;Low (512 MB)';
hddText.innerHTML='<img src="/images/help_off.gif" alt="what is this?"
name="help" width="18" height="18" border="0" align="middle"
onMouseover="ddrivetip(\''+helpText3+'\', 300)"
onMouseout="hideddrivetip()">&nbsp;High (200 GB)';
osText.innerHTML = '<IMG SRC="files/os/server_fedora.gif"
align="right"><img src="/images/help_off.gif" alt="what is this?"
name="help" width="18" height="18" border="0" align="middle"
onMouseover="ddrivetip(\''+helpText4+'\', 300)"
onMouseout="hideddrivetip()">&nbsp;Fedora ';
priceText.innerHTML = '£55.00';
//netPrice.value ='55.00';
netPrice.innerHTML = '£55.00';
netPriceValue.value = 55.00;
showPayment();
updateTotals();
setTextValues('Fedora','Hard Disk: High (200 GB)','Ram: Low (512
MB)','Intel Pentium D 840 (3.20 Ghz)')
break;


case "-1" : //custom build
resetOptions();
setUpTxt.innerHTML = '<strong>Set Up Fee</strong>';
setUpPrice = '£0.00';
setUpValue = 0;
basePrice.value = 70;
//alert(basePrice.value);
setUp.value = format_currency(0);
cpuText.innerHTML='<select name="cpuBrand" class="order_select"
onChange="showCPUs();updateTotals()"><option>Please Select</option><option
value="1">AMD</option>;<option
value="2">Intel</option>;</select><br>';//need tool tip here to show spec of
cpu
cpuText.innerHTML += '<select name="dualProcessor" class="order_select"
onChange="showCPUs()"><option>Please Select</option><option value="N">Single
Processor</option><option value="Y">Dual Processor</option></select><br>';
cpuText.innerHTML += '<select name="dualCore" class="order_select"
onChange="showCPUs()"><option>Please Select</option><option
value="N">Single</option><option value="Y">Dual Core</option></select><br>'

ramText.innerHTML = '<select name="ramOption" class="order_select"
onChange="setRam()"><option>Please Select</option><option value="1">Low
(512MB)</option><option value="2">Medium (1024MB)</option><option
value="3">High (2048MB)</option></select>';
hddText.innerHTML='<select name="hddOption" class="order_select"
id="hddOption" onChange="setHdd()"><option>Please Select</option><option
value="1">Low (40 GB)</option><option value="2">Middle (120
GB)</option><option value="3">High (200 GB)</option></select>';
osText.innerHTML = '<select name="osOption" class="order_select"
id="osOption" onChange="setOs()"><option>Please Select</option><option
value="1" >Windows XP</option><option value="2" >Windows
2000</option><option value="3" >Free BSD</option><option value="4"
Fedora</option></select>';
//priceText.innerHTML = parseFloat(custCPUPrice.value) +
parseFloat(custHDDPrice.value) + parseFloat(custRamPrice.value) +
parseFloat(custOSPrice.value);
custom = "true";
netPriceValue = 0;
showPayment();
break;
}
}

function updateTotals(){
var netPrice = document.getElementById("netPrice");
var custPriceTxt = document.getElementById("cust_system_price");
var discountTotalTxt = document.getElementById("monthlyDiscountTotal");
var priceText = document.getElementById("price_text");
var totalText = document.getElementById("grand_total");
var custHDDPrice = document.getElementById("hddPrice");
var custRamPrice = document.getElementById("ramPrice");
var custOSPrice = document.getElementById("osPrice");
var custCPUPrice = document.getElementById("cpuPrice");
var selectedMonth = document.getElementById("selectedMonth");
var monthlyDiscount = document.getElementById("monthlyDiscount");
var netPriceText = document.getElementById("net_price");
var discountValueTxt = document.getElementById("discountValueTxt");
var setUpFee = document.getElementById("setUp").value;
var basePrice = document.getElementById("basePrice").value;
var totalPrice = parseFloat(format_currency(basePrice)) +
parseFloat(format_currency(netPrice.value)) +
parseFloat(format_currency(custCPUPrice.value)) +
parseFloat(format_currency(custHDDPrice.value)) +
parseFloat(format_currency(custRamPrice.value)) +
parseFloat(format_currency(custOSPrice.value));
var grandTotal = parseFloat(format_currency(setUpFee)) + ((totalPrice) *
(selectedMonth.value) * (monthlyDiscount.value));
var discountValue = ( ( totalPrice * selectedMonth.value ) - grandTotal ) /
selectedMonth.value; //may need to accomodate for setupfee
var custPrice = totalPrice -
parseFloat(format_currency(custOSPrice.value));
var monthPriceAfterDiscount = totalPrice - discountValue;
grandTotal = '£'+format_currency(grandTotal);
totalPrice = '£'+format_currency(totalPrice);
custPrice = '£'+format_currency(custPrice);

priceText.innerHTML = totalPrice;
custPriceTxt.innerHTML = custPrice;
netPriceText.innerHTML = totalPrice;
totalText.innerHTML = grandTotal;
//alert(discountValue)
if(discountValue > 0){
discountValueTxt.innerHTML =
'&nbsp;&nbsp;£ -'+format_currency(discountValue) + ' (Per Month)';
discountTotalTxt.innerHTML = 'Monthly Price After Discount £'
+format_currency(monthPriceAfterDiscount)
} else {
discountValueTxt.innerHTML = '';
discountTotalTxt.innerHTML = ''
}

}
function showPayment(){
var paymentText = document.getElementById("payment");
payment.innerHTML = '<table width="100%" cellpadding="0"
cellspacing="0"><tr><td class="order_header" height="25">Payment
Terms</td></tr><tr><td height="19" colspan="2" valign="top"
class="order_text" style="width: 250px;"><input type="radio"
id="paymentterm" name="paymentterm" value="1" onclick="update_price(1,1);"
checked="checked" />1 Month</td></tr><tr><td height="19" colspan="2"
valign="top" class="order_text" style="width: 250px;"><input type="radio"
id="paymentterm" name="paymentterm" value="3"
onclick="update_price(3,0.90);" >3 Months (10% Discount)</td></tr><tr><td
height="19" colspan="2" valign="top" class="order_text" style="width:
250px;"><input type="radio" id="paymentterm" name="paymentterm" value="6"
onclick="update_price(6,0.85);" >6 Months (15% Discount)</td></tr><tr><td
height="19" colspan="2" valign="top" class="order_text" style="width:
250px;"><input type="radio" id="paymentterm" name="paymentterm" value="12"
onclick="update_price(12,0.80);" >12 Months (20%
Discount)</td></tr></table>'
//update_price(1,0);
updateTotals();
}

function hidePayment(){
var paymentText = document.getElementById("payment");
}
function update_price(itemID,discountGiven){
var payTerm = document.getElementById("paymentterm").value;
var payTermText = document.getElementById("payment_term_text");
var monthDiscount = document.getElementById("monthlyDiscount");
var selectedMonth = document.getElementById("selectedMonth");
monthDiscount.value = discountGiven;
selectedMonth.value = itemID;
var totalText = document.getElementById("grand_total");
switch(itemID){
case 1 :
var discount = "1";
var discountText = 0;
//discount = parseFloat(discount);
if(itemID > 1){
spanClass = '<span class="discount_text">'
discountText = 's ( '+discountText+'% Discount)'
} else {
discountText = '';
spanClass = '<span class="order_text">';
}
payTermText.innerHTML = spanClass + '1 Month' + discountText + '</span>';
updateTotals();
break;
case 3 :
var discount = "0.90";
var discountText = 10;
//discount = parseFloat(discount);
if(itemID > 1){
spanClass = '<span class="discount_text">'
discountText = 's ( '+discountText+'% Discount)'
} else {
discountText = '';
spanClass = '<span class="order_text">';
}
payTermText.innerHTML = spanClass + '3 Month' + discountText + '</span>';
updateTotals();
break;
case 6 :
var discount = "0.85";
var discountText = 15;
//discount = parseFloat(discount);
if(itemID > 1){
spanClass = '<span class="discount_text">'
discountText = 's ( '+discountText+'% Discount)'
} else {
discountText = '';
spanClass = '<span class="order_text">';
}
payTermText.innerHTML = spanClass + '6 Month' + discountText + '</span>';
updateTotals();
break;
case 12 :
var discount = "0.80";
var discountText = 20;
//discount = parseFloat(discount);
if(itemID > 1){
spanClass = '<span class="discount_text">'
discountText = 's ( '+discountText+'% Discount)'
} else {
discountText = '';
spanClass = '<span class="order_text">';
}
payTermText.innerHTML = spanClass + '12 Month' + discountText + '</span>';
updateTotals();
break;
}
//totalText.innerHTML = '£' + format_currency(itemID * netPriceValue *
discount);
}
function setOs(){
var custOSPrice = document.getElementById("osPrice");
var custOS = document.getElementById("osOption").value;
var custOSTxt = document.getElementById("osTxtValue");
switch(custOS){
case "1" :
document.getElementById("netPrice").value = 0;
updateTotals();
setCustText('cust_os_text','cust_os_price','<strong>OS:</strong> Windows
XP','15.00');
custOSPrice.value = '15.00'
custOSTxt.value = 'OS: Windows XP'
updateTotals();
break;
case "2" :
document.getElementById("netPrice").value = 0;
updateTotals();
setCustText('cust_os_text','cust_os_price','<strong>OS:</strong> Windows
2000','10.00');
custOSPrice.value = '10.00'
custOSTxt.value = 'OS: Windows 2000'
updateTotals();
break;
case "3" :
document.getElementById("netPrice").value = 0;
updateTotals();
setCustText('cust_os_text','cust_os_price','<strong>OS:</strong> Free
BSD','0.00');
custOSPrice.value = '0.00'
custOSTxt.value = 'OS: Free BSD'
updateTotals();
break;
case "4" :
document.getElementById("netPrice").value = 0;
updateTotals();
setCustText('cust_os_text','cust_os_price','<strong>OS:</strong>
Fedora','0.00');
custOSPrice.value = '0.00'
custOSTxt.value = 'OS: Fedora'
updateTotals();
break;

}

}
function setHdd(){
var custHDDPrice = document.getElementById("hddPrice");
var custHDD = document.getElementById("hddOption").value;
var custHDDTxt = document.getElementById("osHddValue");
switch(custHDD){
case "1" :
custHDDPrice.value = 5.00;
custHDDTxt = 'HDD: Low (40 GB)';
setCustomText('cust_system_text_hdd', 'HDD: 40 GB');
break;
case "2" :
custHDDPrice.value = 10.00;
custHDDTxt = 'HDD: Middle (120 GB)';
setCustomText('cust_system_text_hdd', 'HDD: 120 GB');
break;
case "3" :
custHDDPrice.value = 15.00;
custHDDTxt = 'HDD: High (200 GB)';
setCustomText('cust_system_text_hdd', 'HDD: 200 GB');
break;
}
updateTotals()
}

function setCpu(setPrice,setName){
var custCPUPrice = document.getElementById("cpuPrice");
var custCPUTxt = document.getElementById("cpuTxtValue");
custCPUPrice.value = setPrice;
custCPUTxt.value = setName;
setCustomText('cust_system_text_cpu', '<strong>System: </strong>'+setName+'
|| ');
updateTotals()
}


function setRam(){
var custRamPrice = document.getElementById("ramPrice");
var custRam = document.getElementById("ramOption").value;
switch(custRam){
case "1" :
//setCustText('cust_ram_text','cust_ram_price','<strong>RAM :</strong> Low
(512 MB)','7.50');
custRamPrice.value = '7.50';
setCustomText('cust_system_text_ram',' RAM: 512 MB || ');
break;
case "2" :
//setCustText('cust_ram_text','cust_ram_price','<strong>RAM :</strong>
Medium (1024 MB)','15.00');
custRamPrice.value = '15.00';
setCustomText('cust_system_text_ram',' RAM: 1024 MB || ');
break;
case "3" :
//setCustText('cust_ram_text','cust_ram_price','<strong>RAM :</strong>
High (2048 MB)','25.00');
custRamPrice.value = '25.00';
setCustomText('cust_system_text_ram',' RAM: 2048 MB || ');
break;
}
updateTotals()
}
function setCustomText(itemID,itemTxt){
var custSetupTxt = document.getElementById("cust_setup_text");
var custSetupPrice = document.getElementById("cust_setup_price");
d=document.all;
i = setCustomText.arguments;
d[i[0]].innerHTML = itemTxt;
custSetupTxt.innerHTML = '<strong>Set Up</strong>'
custSetupPrice.innerHTML = '£0'
}
function resetOptions(){
document.getElementById("ramPrice").value = 0;
document.getElementById("netPrice").value = 0;
document.getElementById("cpu_text").innerHTML = ' ';
document.getElementById("cpuPrice").value = 0;
document.getElementById("hddPrice").value = 0;
document.getElementById("cpuName").innerHTML = ' ';
document.getElementById("osPrice").value = 0;
document.getElementById("cust_os_text").innerHTML = ' ';
document.getElementById("cust_os_price").innerHTML = ' ';
document.getElementById("price_text").innerHTML = ' ';
document.getElementById("cust_system_text_hdd").innerHTML = ' ';
document.getElementById("cust_system_text_cpu").innerHTML = ' ';
document.getElementById("cust_system_text_ram").innerHTML = ' ';
updateTotals();
}

</script>
<script type="text/javascript">
function showCPUs() {
var s = 0;
var cpuItem = new Array();
//name brandID dualCore dualProcessor price cpuID
cpuItem[s++] = [' ( Ghz)','','','','','',''];
cpuItem[s++] = ['Pentium 4 HT (3.20 Ghz)','2','N','N','14.50','p4.jpg','2'];
cpuItem[s++] = ['Pentium D 820 (2.80
Ghz)','2','Y','N','17.50','pd.jpg','3'];
cpuItem[s++] = ['Pentium D 830 (3.00
Ghz)','2','Y','N','24.00','pd.jpg','4'];
cpuItem[s++] = ['Pentium D 840 (3.20
Ghz)','2','Y','N','38.00','pd.jpg','5'];
cpuItem[s++] = ['Xeon (2.40 Ghz)','2','N','Y','20.00','xeon.jpg','6'];
cpuItem[s++] = ['Xeon (2.80 Ghz)','2','N','Y','32.00','xeon.jpg','7'];
cpuItem[s++] = ['Xeon (3.00 Ghz)','2','N','Y','40.00','xeon.jpg','8'];
cpuItem[s++] = ['Xeon (3.60 Ghz)','2','N','Y','100.00','xeon.jpg','9'];
cpuItem[s++] = ['Athlon 64 3000 (3.00
Ghz)','1','N','N','0.00','a64.jpg','13'];
cpuItem[s++] = ['Athlon 64 3200 (3.20
Ghz)','1','N','N','5.00','a64.jpg','14'];
cpuItem[s++] = ['Athlon 64 3500 (3.50
Ghz)','1','N','N','15.00','a64.jpg','15'];
cpuItem[s++] = ['Athlon 64 4000 (4.00
Ghz)','1','N','N','25.00','a64.jpg','16'];
cpuItem[s++] = ['Athlon 64 X2 4200 (2.20
Ghz)','1','Y','N','35.00','a64X2.jpg','17'];
cpuItem[s++] = ['Athlon 64 X2 4400 (2.20
Ghz)','1','Y','N','40.00','a64X2.jpg','18'];
cpuItem[s++] = ['Athlon 64 X2 4600 (2.40
Ghz)','1','Y','N','60.00','a64X2.jpg','19'];
cpuItem[s++] = ['Athlon 64 X2 4800 (2.40
Ghz)','1','Y','N','70.00','a64X2.jpg','20'];
cpuItem[s++] = ['Opteron 242 (1.60
Ghz)','1','N','Y','20.00','opteron.jpg','21'];
cpuItem[s++] = ['Opteron 244 (1.80
Ghz)','1','N','Y','30.00','opteron.jpg','22'];
cpuItem[s++] = ['Opteron 246 (2.00
Ghz)','1','N','Y','45.00','opteron.jpg','23'];
cpuItem[s++] = ['Opteron 252 (2.60
Ghz)','1','Y','Y','120.00','opteron.jpg','24'];
cpuItem[s++] = ['Pentium 4 HT (2.80
Ghz)','2','N','N','12.50','p4.jpg','26'];
cpuItem[s++] = ['Pentium 4 HT (3.40
Ghz)','2','N','N','16.50','p4.jpg','25'];

document.getElementById("cpuName").value = "";
document.getElementById("dualCore").value =
document.getElementById("dualCore").value.toUpperCase();
document.getElementById("dualProcessor").value =
document.getElementById("dualProcessor").value.toUpperCase();
//
if (document.getElementById("cpuBrand").value == "") return;
if ("12".indexOf(document.getElementById("cpuBrand").value) < 0) {
alert("Invalid CPU Brand!");
return;
}
if (document.getElementById("dualCore").value == "") return;
if ("YN".indexOf(document.getElementById("dualCore").value) < 0) {
alert("Invalid Dual Core!");
return;
}
if (document.getElementById("dualProcessor").value == "") return;
if ("YN".indexOf(document.getElementById("dualProcessor").value) < 0) {
alert("Invalid Dual Processor!");
return;
}
//
var item = "<strong>Please select A CPU from below</strong>"
for (var i=1; i<cpuItem.length; i++) {
if (document.getElementById("cpuBrand").value == cpuItem[1]) {
if (document.getElementById("dualCore").value == cpuItem[2])
{
if (document.getElementById("dualProcessor").value ==
cpuItem[3]) {
if (item != "") item += "<br>";
item += '<input type="radio" name="selectedCPU"
value="'+cpuItem[5]+'"
onClick="setCpu('+cpuItem[4]+',\''+cpuItem[0]+'\')" >'+cpuItem[0];
//item += '<input type="radio" name="selectedCPU"
value="'+cpuItem[5]+'"
onClick="setCustText(\'cust_cpu_text\',\'cust_cpu_price\',\'<strong>CPU:</strong>
'+cpuItem[0]+'\',\''+cpuItem[4]+'\');setCpu('+cpuItem[4]+',\''+cpuItem[0]+'\')"
'+cpuItem[0];

}
}
}
}
document.getElementById("cpuName").innerHTML = item;

}

function setCustText(custDivName,custDivPrice,itemName,itemPrice){
d=document.all;
i = setCustText.arguments;
d[i[0]].innerHTML = itemName;
d[i[1]].innerHTML = '£'+itemPrice;
updateTotals()
}

function setTextValues(os,hdd,ram,cpu){
document.getElementById("osTxtValue").value = os;
document.getElementById("cpuTxtValue").value = cpu;
document.getElementById("ramTxtValue").value = ram;
document.getElementById("hddTxtValue").value = hdd;
}

function setupPage(){
document.getElementById("packageRef").value = 0;
document.getElementById("cpuName").innerHTML = '';
document.getElementById("price_text").innerHTML = '';
document.getElementById("net_price").innerHTML = '';
document.getElementById("grand_total").innerHTML = '';
document.getElementById("monthlyDiscountTotal").innerHTML = '';
document.getElementById("discountValueTxt").innerHTML = '';
document.getElementById("netPrice").value = 0;
document.getElementById("selectedMonth").value = 1;
document.getElementById("monthlyDiscount").value = 1;
//update_price(1,0);
}
</script>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="styles.css" rel="stylesheet" type="text/css">
</head>

<body background="images/page_bg.jpg" link="#000000" vlink="#000000"
alink="#000000" onLoad="setupPage()">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:
collapse" bordercolor="#111111" width="786" id="AutoNumber1" height="100%"
background="images/page_bg2.jpg">
<tr>
<td width="100%" align="center" valign="top">
<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#111111" width="750"
id="AutoNumber2" height="100%">
<tr>
<td width="100%" height="160" valign="top" colspan="2">
<table border="0" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#111111" width="750"
id="AutoNumber3" height="160">
<tr>
<td width="329" height="91">
<a href="index.php"><img border="0" src="images/logo.jpg"
width="329" height="91"></a></td>
<td width="421" rowspan="2">
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="421" HEIGHT="160" ALIGN=""> <PARAM NAME=movie VALUE="flash.swf"> <PARAM NAME=quality VALUE=high> <PARAMNAME=bgcolor VALUE=#224E73> <EMBED src="flash.swf" quality=high bgcolor=#224E73WIDTH="421" HEIGHT="160" ALIGN="" TYPE="application/x-shockwave-flash"PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT></td> </tr> <form name="frmMembers" action="http://support.rackage.com"method="post"><tr> <td width="329" background="images/login_bg.jpg" valign="top"><table border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse" bordercolor="#111111" width="100%" id="AutoNumber9" height="57"> <tr> <td width="100%" height="28" colspan="5"> <span style="font-size: 4px">&nbsp;</span><b><fontface="Arial" color="#224E74" style="font-size: 4px">&nbsp; </font></b> <p><b> <font face="Arial" color="#224E74" style="font-size:12px">&nbsp; Client Login <input type="hidden" name="r_email" value="Username"> <input type="hidden" name="r_passed_password" value="AccountPassword"> </font></b></td> </tr> <tr> <td width="20%"> <font face="Arial" style="font-size: 11px"color="#FFFFFF">&nbsp; User</font></td> <td width="20%"> <font face="Arial" style="font-size: 11px" color="#FFFFFF"> <input name="email" type="text" size="14"> </font></td> <td width="20%"> <font face="Arial" style="font-size: 11px"color="#FFFFFF">&nbsp; Pass</font></td> <td width="20%"> <font face="Arial" style="font-size: 11px" color="#FFFFFF"> <input name="passed_password" type="password"size="14"></font></td> <td width="20%"> <input name="imageField" type="image"src="images/button_login.jpg" width="29" height="29" border="0"></td> </tr> </table> </td> </tr></form> </table> </td> </tr> <tr> <td width="187" height="100%" background="images/left_bg.jpg"valign="top"> <table border="0" cellpadding="0" cellspacing="0"style="border-collapse: collapse" bordercolor="#111111" width="187"id="AutoNumber6" background="images/left_bg2.jpg"> <tr> <td width="100%" height="1" background="images/news_bg.jpg"> <font face="Arial" style="font-size: 12px; font-weight:700">&nbsp; Latest News</font> <p><span style="font-weight: 700"> <font face="Arial" style="font-size:2px">&nbsp;</font></span></td> </tr> <tr> <td width="100%"> <table border="0" cellpadding="0"cellspacing="0" style="border-collapse: collapse" bordercolor="#111111"width="96%" id="AutoNumber10"> <tr> <td width="100%"> <table border="0" cellpadding="0" cellspacing="0"style="border-collapse: collapse" bordercolor="#111111" width="100%"id="AutoNumber11"> <tr> <td width="50%" align="left"><font face="Arial" style="font-size: 11px"color="#6AA5D7">&nbsp;&nbsp;&nbsp;Andy</font></td> <td width="50%" align="right"><font face="Arial" style="font-size:11px" color="#6AA5D7">July 12, 2005</font></td> </tr> </table> <img src="/images/anounce.gif" alt="Anouncement"width="11" height="13"><font face="Arial" style="font-size: 11px">&nbsp;<ahref="http://forum.rackage.com/viewtopic.php?t=23">Game Monitor</a> </font></td> </tr> <tr> <td height="5"></td> </tr> <tr> <td height="1" bgcolor="#DBDBDB"></td> </tr> </table> <table border="0" cellpadding="0"cellspacing="0" style="border-collapse: collapse" bordercolor="#111111"width="96%" id="AutoNumber10"> <tr> <td width="100%"> <table border="0" cellpadding="0" cellspacing="0"style="border-collapse: collapse" bordercolor="#111111" width="100%"id="AutoNumber11"> <tr> <td width="50%" align="left"><font face="Arial" style="font-size: 11px"color="#6AA5D7">&nbsp;&nbsp;&nbsp;Randles</font></td> <td width="50%" align="right"><font face="Arial" style="font-size:11px" color="#6AA5D7">June 24, 2005</font></td> </tr> </table> <img src="/images/anounce.gif" alt="Anouncement"width="11" height="13"><font face="Arial" style="font-size: 11px">&nbsp;<ahref="http://forum.rackage.com/viewtopic.php?t=11">Battlefield 2 ServersReleased</a> </font></td> </tr> <tr> <td height="5"></td> </tr> <tr> <td height="1" bgcolor="#DBDBDB"></td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0"style="border-collapse: collapse" bordercolor="#111111" width="96%"id="AutoNumber10"><tr><td width="100%"><table border="0" cellpadding="0"cellspacing="0" style="border-collapse: collapse" bordercolor="#111111"width="100%" id="AutoNumber11"><tr><td width="50%" align="left"><fontface="Arial" style="font-size: 11px"color="#6AA5D7">&nbsp;&nbsp;&nbsp;Andy</font></td> <td width="50%" align="right"><font face="Arial" style="font-size: 11px"color="#6AA5D7">July 12, 2005</font></td></tr></table><img src="/images/sticky.gif" alt="Sticky" width="11" height="13"><fontface="Arial" style="font-size: 11px">&nbsp;<ahref="http://forum.rackage.com/viewtopic.php?t=22">EA Solution to BF2Problems</a></font></td></tr><tr><td height="5"></td></tr><tr><td height="1" bgcolor="#DBDBDB"></td></tr></table> <table border="0" cellpadding="0" cellspacing="0"style="border-collapse: collapse" bordercolor="#111111" width="96%"id="AutoNumber10"><tr><td width="100%"><table border="0" cellpadding="0"cellspacing="0" style="border-collapse: collapse" bordercolor="#111111"width="100%" id="AutoNumber11"><tr><td width="50%" align="left"><fontface="Arial" style="font-size: 11px"color="#6AA5D7">&nbsp;&nbsp;&nbsp;Andy</font></td> <td width="50%" align="right"><font face="Arial" style="font-size: 11px"color="#6AA5D7">July 12, 2005</font></td></tr></table><img src="/images/sticky.gif" alt="Sticky" width="11" height="13"><fontface="Arial" style="font-size: 11px">&nbsp;<ahref="http://forum.rackage.com/viewtopic.php?t=20">Ranked BF2 Servers</a></font></td></tr><tr><td height="5"></td></tr><tr><td height="1" bgcolor="#DBDBDB"></td></tr></table> <table border="0" cellpadding="0" cellspacing="0"style="border-collapse: collapse" bordercolor="#111111" width="100%"id="AutoNumber12" height="53"> <tr> <td colspan="3"> <p align="right"><font face="Arial" style="font-size:11px"> <img border="0" src="images/green_arrow.jpg" width="8"height="8"> <a href="http://forum.rackage.com/viewforum.php?f=2">morenews</a>&nbsp;&nbsp;</font></td> </tr> <tr> <td colspan="3" height="5"><table border="0"cellpadding="0" cellspacing="0" style="border-collapse: collapse"bordercolor="#111111" width="187" id="AutoNumber7" height="104"> <!--DWLayoutTable--> <tr> <td height="20" colspan="2" background="images/news_bg.jpg"> <font face="Arial" style="font-size: 12px; font-weight:700">&nbsp; Links </font> </tr> <tr> <td valign="top"><table width="100%" border="0" cellpadding="0"cellspacing="0" background="images/left_listing.jpg"> <!--DWLayoutTable--> <tr> <td width="33" height="21">&nbsp;</td> <td width="154" valign="middle"><font face="Arial"style="font-size: 11px"><a href="gameservers.php">GameServers</a></font></td> </tr> <tr> <td height="21">&nbsp;</td> <td valign="middle"><font face="Arial" style="font-size:11px"><a href="voiceservers.php">Voice Servers</a></font></td> </tr> <tr> <td height="21">&nbsp;</td> <td valign="middle"><font face="Arial" style="font-size:11px"><a href="dedicatedservers.php">Dedicated Servers</a></font></td> </tr> <tr> <td height="21">&nbsp;</td> <td valign="middle"><font face="Arial" style="font-size:11px"><a href="colocationservers.php">Colocation</a></font></td> </tr> <tr> <td height="21">&nbsp;</td> <td valign="middle"><font face="Arial" style="font-size:11px"><a href="http://forum.rackage.com/.php">Forum</a></font></td> </tr> <tr> <td height="21">&nbsp;</td> <td valign="middle"><font face="Arial" style="font-size:11px"><a href="support.php">Network Status</a></font></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td height="20" colspan="3" background="images/news_bg.jpg"> <font face="Arial" style="font-size: 12px; font-weight:700">&nbsp; Popular Posts </font></td> </tr> <tr> <td width="49%" height="1" align="left"><fontface="Arial" style="font-size: 11px"color="#6AA5D7">&nbsp;Randles</font></td> <td width="50%" align="right"><font face="Arial"style="font-size: 11px" color="#6AA5D7">March 30, 2005&nbsp;</font></td> <td width="1%" align="right"></td> </tr> <tr> <td height="1" colspan="2"><font face="Arial"style="font-size: 11px">&nbsp;<ahref="http://forum.rackage.com/viewtopic.php?t=2">Nice OneLArron</a></font></td> <td height="1"></td> </tr> <tr><td colspan="3" height="5"></td></tr><tr><td height="1" colspan="2" bgcolor="#DBDBDB"></td><td height="1"></td></tr> <tr> <td width="49%" height="1" align="left"><fontface="Arial" style="font-size: 11px"color="#6AA5D7">&nbsp;Randles</font></td> <td width="50%" align="right"><font face="Arial"style="font-size: 11px" color="#6AA5D7">October 21, 2000&nbsp;</font></td> <td width="1%" align="right"></td> </tr> <tr> <td height="1" colspan="2"><font face="Arial"style="font-size: 11px">&nbsp;<ahref="http://forum.rackage.com/viewtopic.php?t=1">Welcome to phpBB2</a></font></td> <td height="1"></td> </tr> <tr><td colspan="3" height="5"></td></tr><tr><td height="1" colspan="2" bgcolor="#DBDBDB"></td><td height="1"></td></tr> <tr> <td colspan="3" height="5"></td> </tr> <tr> <td height="20" colspan="3" background="images/news_bg.jpg"> <font face="Arial" style="font-size: 12px; font-weight:700">&nbsp; Recent Posts </font></td> </tr> <tr> <td align="left"><font face="Arial" style="font-size:11px" color="#6AA5D7"><font face="Arial" style="font-size: 11px"color="#6AA5D7">&nbsp;Anonymous</font></font></td> <td align="right"><font face="Arial" style="font-size:11px" color="#6AA5D7">August 02, 2005&nbsp;</font></td> <td align="right">&nbsp;</td> </tr> <tr> <td colspan="3"><font face="Arial" style="font-size:11px">&nbsp;<a href="http://forum.rackage.com/viewtopic.php?t=30">UltimaOnline Game Server</a></font></td> </tr> <tr><td colspan="3" height="5"></td></tr><tr><td height="1" colspan="2" bgcolor="#DBDBDB"></td><td height="1"></td></tr> <tr> <td align="left"><font face="Arial" style="font-size:11px" color="#6AA5D7"><font face="Arial" style="font-size: 11px"color="#6AA5D7">&nbsp;Anonymous</font></font></td> <td align="right"><font face="Arial" style="font-size:11px" color="#6AA5D7">August 02, 2005&nbsp;</font></td> <td align="right">&nbsp;</td> </tr> <tr> <td colspan="3"><font face="Arial" style="font-size:11px">&nbsp;<a href="http://forum.rackage.com/viewtopic.php?t=30">UltimaOnline Game Server</a></font></td> </tr> <tr><td colspan="3" height="5"></td></tr><tr><td height="1" colspan="2" bgcolor="#DBDBDB"></td><td height="1"></td></tr> <tr> <td colspan="3" height="5"></td> </tr> </table> </td> </tr></table> <table border="0" cellpadding="0" cellspacing="0"style="border-collapse: collapse" bordercolor="#111111" width="187"id="AutoNumber7" height="65" background="images/left_listing.jpg"> <tr> <td width="100%"></td> </tr> </table> </td> <td width="563" height="100%" valign="top"> <table border="0" cellpadding="0" cellspacing="0"style="border-collapse: collapse" bordercolor="#111111" width="563"id="AutoNumber8"> <!--DWLayoutTable--> <tr> <td width="100%" height="212"><table cellspacing="0"cellpadding="0" border="0" width="100%" height="100%"><tr><tr><td></td> <td valign="top" colspan="2" height="100%" style="padding-left: 15px;padding-bottom: 7px;"> <table cellspacing="0" cellpadding="0" border="0" width="100%"style="margin-top: 0px;"> <tr> <td rowspan="2"> </td> <td align="right" valign="bottom"><span id="hinttext"class="poll">&nbsp;</span></td> </tr> </table> <form action="buy_dedicatedserver.php" method="post" id="actionForm"enctype="multipart/form-data"> <div> <!-- *** HTML HERE GOES ABOVE FIRST FORM *** ---> <p><font face="Arial" style="font-size: 20px; font-weight: 700"color="#224E74">Dedicated Servers</font></p> <table cellspacing="0" cellpadding="0" border="0"> <!--DWLayoutTable--> <tr> <td width="537" height="25" class="order_header">Packages</td> </tr><tr> <td valign="top" class="order_bg"><table width="100%" border="0"cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="10" >&nbsp;</td> <td colspan="2" valign="top"> <select name="packageRef" class="order_select"id="packageRef" onChange="javascript:showPackage()"> <option value="0" selected>Please Select</option> <option value="1">ServerPackage 1</option> <option value="2">ServerPackage 2</option> <option value="3">ServerPackage 3</option> <option value="4">ServerPackage 4</option> <option value="-1" >Custom Build</option> </select> <input name="custom" type="hidden" id="custom"value="false"> </td> </tr><tr> <td ></td> <td width="510" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="139" valign="top" class="order_text"id="os"></td> <td width="371" valign="top" class="order_text"id="os_text"></td> </tr> <tr> <td valign="top" class="order_text" id="cpu"></td> <td valign="top" class="order_text" id="cpu_text"></td> </tr><tr> <td valign="top" class="order_text" id="cpuList"></td> <td valign="top" class="order_text" id="cpuNameList"><spanname="cpuName" id="cpuName"></span></td> </tr> <tr> <td valign="top" class="order_text" id="ram"></td> <td valign="top" class="order_text" id="ram_text"></td> </tr> <tr> <td valign="top" class="order_text" id="hdd"></td> <td valign="top" class="order_text" id="hdd_text"></td> </tr><tr> <td valign="top" class="order_text" id="price"></td> <td valign="top" class="order_text" id="price_text"></td> </tr> <tr> <td valign="top"></td> <td valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td> </tr> </table></td> <td width="15"></td> </tr><tr> <td height="18" colspan="3" valign="top" id="payment"></td></tr><tr> <td height="18" colspan="3" valign="top" id="breakdown"><tablewidth="100%" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td height="25" colspan="3" valign="top" class="order_header"id="total_text">Breakdown</td> </tr> <tr> <td width="9" height="18"></td> <td width="255" valign="top" class="order_text"id="total_text"><strong>Package</strong></td> <td width="271" align="right" valign="top" class="order_text"id="package_name"></td> </tr> <tr> <td></td> <td valign="top" class="order_text"><spanid="cust_system_text_cpu"></span><spanid="cust_system_text_ram"></span><spanid="cust_system_text_hdd"></span></td> <td align="right" valign="top" class="order_text"id="cust_system_price"></td> </tr> <tr> <td></td> <td valign="top" class="order_text" id="cust_os_text"></td> <td align="right" valign="top" class="order_text"id="cust_os_price"></td> </tr> <tr> <td></td> <td valign="top" class="order_text" id="cust_ram_text"></td> <td align="right" valign="top" class="order_text"id="cust_ram_price"></td> </tr> <tr> <td></td> <td valign="top" class="order_text" id="cust_hdd_text"></td> <td align="right" valign="top" class="order_text"id="cust_hdd_price"></td> </tr> <tr> <td></td> <td valign="top" class="order_text" id="total_text"><strong>Price <input name="basePrice" type="hidden" id="basePrice"><inputname="setUp" type="hidden" id="setUp"> <input name="selectedMonth" type="hidden" id="selectedMonth" value="1"> <input name="monthlyDiscount" type="hidden" id="monthlyDiscount"value="1"> <input name="netPrice" type="hidden" id="netPrice" value="0"> <input name="hddPrice" type="hidden" id="hddPrice" value="0"> <input name="cpuPrice" type="hidden" id="cpuPrice" value="0"> <input name="ramPrice" type="hidden" id="ramPrice" value="0"> <input name="osPrice" type="hidden" id="osPrice" value="0"> <input name="osTxtValue" type="hidden" id="osTxtValue"> <input name="cpuTxtValue" type="hidden" id="cpuTxtValue"> <input name="ramTxtValue" type="hidden" id="ramTxtValue"> <input name="hddTxtValue" type="hidden" id="hddTxtValue"> </strong></td> <td align="right" valign="top" class="order_text" id="net_price"></td> </tr> <tr> <td height="18"></td> <td valign="top" class="order_text" id="total_text"><strong>PaymentTerm </strong></td> <td align="right" valign="top"><span id="payment_term_text"><spanclass="order_text"></span></span><span id="discountValueTxt"class="discount_text"></span><br><span id="monthlyDiscountTotal"class="discount_text"></span></td> </tr><tr> <td></td> <td valign="top" class="order_text" id="cust_setup_text"></td> <td align="right" valign="top" class="order_text"id="cust_setup_price"></td> </tr> <tr> <td height="18"></td> <td valign="top" class="order_text" id="total_text"><strong>GrandTotal </strong></td> <td align="right" valign="top" class="order_text"id="grand_total"><!--DWLayoutEmptyCell-->&nbsp;</td> </tr> </table></td> </tr> <tr> <td></td> <td><input name="order" type="submit"class="order_button" id="order" value="Order"></td> <td></td> </tr> </table></td> </tr><tr><td height="16" valign="top"><imgsrc="images/order_footer.gif"></td></tr><tr> <td></td> </tr> </table> <!-- *** HTML HERE GOES BELOW FIRST FORM *** ---> </div> <input type="hidden" name="m" value="proc" /> </form> <table style="display: none;"> <tr id="template"> <td></td> <td><select onchange="update_price();" class="order_select"></select>players</td> <td><button type="button" class="order_button">Remove</button></td> </tr> </table></td><td></td><td style="width: 14px;"></td></tr></table></td> </tr> </table> </td> </tr> <tr> <td width="100%" height="43" background="images/footer_bg.jpg"colspan="2"> <table border="0" cellpadding="0" cellspacing="0"style="border-collapse: collapse" bordercolor="#111111" width="750"id="AutoNumber4" height="43"> <tr> <td width="388" height="43"background="images/footer_bg2.jpg"><!--DWLayoutEmptyCell-->&nbsp;</td> <td width="362" height="43"> <table border="0" cellpadding="0" cellspacing="0"style="border-collapse: collapse" bordercolor="#111111" width="362"id="AutoNumber5" height="43"> <tr> <td width="100%"> <p align="center"><font face="Arial" style="font-size:11px"><b> <a href="index.php">Home</a>&nbsp;| <ahref="services.php">Services</a> | <a href="support.php">Support</a> | <ahref="http://forum.rackage.com" target="_blank">Forums</a> | <a href="contact.php">Contact</a></b></font></td> </tr> <tr> <td width="100%" valign="top"> <p align="center"><font face="Arial" style="font-size:10px">© RackageServers.com 2005 </font><font face="Arial"style="font-size: 10px"><b><a href="tos.php">Terms</a> | <ahref="privacy.php">Privacy Policy</a></b></font></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr></table></div></body></html>
 
L

Lee

Craig Keightley said:
Please help, i have attached my page which worksin IE but i cannnot get the
drop down menu to fucntion in firefox. Any one have any ideas why?

Just a suggestion:

Instead of asking us to look at over 700+ lines of code, build the
smallest example that shows your problem. There's a good chance
that you'll find the problem while you're doing that, and if not,
a lot more people will be willing to take a look.
 
R

RobG

Craig said:
Please help, i have attached my page which worksin IE but i cannnot get the
drop down menu to fucntion in firefox. Any one have any ideas why?
[...]


As already mentioned, no-one is going to help you with this because:

1. It's not reasonable to ask for debugging of hundreds of lines of
code that do not validate.

2. You give no indication of what the error is

3. Your code does not work at all - the lines are programmatically
broken and so generate tons of errors, most probably not related to
your issue.

4. There are two linked script files that may be the cause of the error.

So generate a small test case that replicates your problem and post
that. Below is a slab of your code that has been broken because of
the way you posted it - there are many other places where it happened.

Use 2 or 4 spaces for indents, not tabs, and manually break lines at
about 70 characters and ensure it will work if copy/pasted into a
local page.
height=&quot;34&quot; align=&quot;center&quot;></td></tr></table>'; //hdd
var helpText4 = '<table cellpadding=0 cellspacing=0 ><tr><td
class=&quot;order_text&quot; valign=&quot;top&quot;>Choose which operating
system you wish to use on your server, remember that some games will release
servers / patches for windows much earlier that for Linux. It is advisable
to choose the operating system that you are most comfortable with.</td><td
class=&quot;order_text&quot; width=&quot;105&quot; height=&quot;34&quot;
align=&quot;center&quot;></td></tr></table>'; //os

[...]

Anyhow, here's a suggestion - in the following function:
function setCustomText(itemID,itemTxt){
var custSetupTxt = document.getElementById("cust_setup_text");
var custSetupPrice = document.getElementById("cust_setup_price");
Replace:

d=document.all;
i = setCustomText.arguments;
d[i[0]].innerHTML = itemTxt;

With:

document.getElementById(itemID).innerHTML = itemTxt;

custSetupTxt.innerHTML = '<strong>Set Up</strong>'
custSetupPrice.innerHTML = '£0'
}
[...]


function setCustText(custDivName,custDivPrice,itemName,itemPrice){
d=document.all;
i = setCustText.arguments;
d[i[0]].innerHTML = itemName;
d[i[1]].innerHTML = '£'+itemPrice;
updateTotals()

Here again you've created local variables then ignored them:

function setCustText(custDivName,custDivPrice,itemName,itemPrice){
document.getElementById(custDivName).innerHTML = itemName;
document.getElementById(custDivPrice).innerHTML = '£'+itemPrice;
updateTotals()
}

[...]
 
C

Craig Keightley

hi all apologies for my last post
i have narrowed it down to the array part of the following function:


function showCPUs() {
var cpuItem = new Array();
//name brandID dualCore dualProcessor price cpuID
cpuItem[0] = ['Athlon 64 3000 (1.80
Ghz)','1','N','N','0.00','a64.jpg','13'];
cpuItem[1] = ['Athlon 64 3200 (2.00
Ghz)','1','N','N','5.00','a64.jpg','14'];
cpuItem[2] = ['Athlon 64 3500 (2.20
Ghz)','1','N','N','15.00','a64.jpg','15'];
cpuItem[3] = ['Athlon 64 4000 (2.40
Ghz)','1','N','N','25.00','a64.jpg','16'];
cpuItem[4] = ['Athlon 64 X2 4200 (2.20
Ghz)','1','Y','N','35.00','a64X2.jpg','17'];
cpuItem[5] = ['Athlon 64 X2 4400 (2.20
Ghz)','1','Y','N','43.50','a64X2.jpg','18'];
cpuItem[6] = ['Athlon 64 X2 4600 (2.40
Ghz)','1','Y','N','51.50','a64X2.jpg','19'];
cpuItem[7] = ['Athlon 64 X2 4800 (2.40
Ghz)','1','Y','N','70.00','a64X2.jpg','20'];
cpuItem[8] = ['Opteron 242 (1.60
Ghz)','1','N','Y','20.00','opteron.jpg','21'];
cpuItem[9] = ['Opteron 244 (1.80
Ghz)','1','N','Y','39.50','opteron.jpg','22'];
cpuItem[10] = ['Opteron 246 (2.00
Ghz)','1','N','Y','42.00','opteron.jpg','23'];
cpuItem[11] = ['Opteron 248 (2.20
Ghz)','1','N','Y','50.50','opteron.jpg','28'];
cpuItem[12] = ['Opteron 250 (2.40
Ghz)','1','N','Y','100.00','opteron.jpg','0'];
cpuItem[13] = ['Opteron 252 (2.60
Ghz)','1','N','Y','120.00','opteron.jpg','24'];
cpuItem[14] = ['Opteron 265 (1.80
Ghz)','1','Y','Y','125.50','opteron.jpg','29'];
cpuItem[15] = ['Opteron 270 (2.00
Ghz)','1','Y','Y','150.00','opteron.jpg','30'];
cpuItem[16] = ['Pentium 4 HT (2.80
Ghz)','2','N','N','12.50','p4.jpg','26'];
cpuItem[17] = ['Pentium 4 HT (3.00
Ghz)','2','N','N','12.50','p4.jpg','1'];
cpuItem[18] = ['Pentium 4 HT (3.20
Ghz)','2','N','N','14.50','p4.jpg','2'];
cpuItem[19] = ['Pentium 4 HT (3.40
Ghz)','2','N','N','16.50','p4.jpg','25'];
cpuItem[20] = ['Pentium D 820 (2.80
Ghz)','2','Y','N','17.50','pd.jpg','3'];
cpuItem[21] = ['Pentium D 830 (3.00
Ghz)','2','Y','N','24.00','pd.jpg','4'];
cpuItem[22] = ['Pentium D 840 (3.20
Ghz)','2','Y','N','38.00','pd.jpg','5'];
cpuItem[23] = ['Xeon (2.40 Ghz)','2','N','Y','20.00','xeon.jpg','6'];
cpuItem[24] = ['Xeon (2.80 Ghz)','2','N','Y','32.00','xeon.jpg','7'];
cpuItem[25] = ['Xeon (3.00 Ghz)','2','N','Y','40.00','xeon.jpg','8'];
cpuItem[26] = ['Xeon (3.60 Ghz)','2','N','Y','100.00','xeon.jpg','9'];
if (document.getElementById("cpuBrand").value == '') return;
if (document.getElementById("dualCore").value == '') return;
if (document.getElementById("dualProcessor").value == '') return;
var item = "<strong>Please select A CPU from below</strong>"
for (var i=1; i<cpuItem.length; i++) {
if (document.getElementById("cpuBrand").value == cpuItem[1]) {
if (document.getElementById("dualCore").value == cpuItem[2])
{
if (document.getElementById("dualProcessor").value ==
cpuItem[3]) {
if (item != "") item += "<br>";
item += '<input type="radio" name="selectedCPU"
value="'+cpuItem[5]+'"
onClick="setCpu('+cpuItem[4]+',\''+cpuItem[0]+'\')" >'+cpuItem[0];
//item += '<input type="radio" name="selectedCPU"
value="'+cpuItem[5]+'"
onClick="setCustText(\'cust_cpu_text\' said:
'+cpuItem[0];

}
}
}
}
document.getElementById("cpuName").innerHTML = item;
//document.getElementById("cpuName").innerHTML = 'test';
}is this correct?
 
L

Lee

Craig Keightley said:
hi all apologies for my last post

Better, but could still use work.
Don't post tab characters, convert to spaces and don't indent much.
Many news systems wrap lines, which makes it hard to read and even
harder to test.

It helps a lot if you post testable code. At the very least, you
should include the form fields that your code references, so we
can see that there's no problem it the way that you access values.
Some browsers don't support a "value" attribute of Select controls,
for example (although Firefox does, so that's not your problem).

Here's a simplified version of your code. I removed some tests
that aren't necessary ("item" can never be empty, for example),
and moved the array initialization to outside of the function so
it only gets executed once, and I simplified the initialization.
I also combined a chain of "if" statements into one.

This version works in IE and Firefox:


<html>
<head>
<title>demo</title>
<script type="text/javascript">
var cpuItem = [
['Athlon 64 3000 (1.80 Ghz)','1','N','N','0.00','a64.jpg','13'],
['Athlon 64 3200 (2.00 Ghz)','1','N','N','5.00','a64.jpg','14'],
['Athlon 64 X2 4200 (2.20 Ghz)','1','Y','N','35.00','a64X2.jpg','17'],
['Athlon 64 X2 4400 (2.20 Ghz)','1','Y','N','43.50','a64X2.jpg','18'],
['Opteron 242 (1.60 Ghz)','1','N','Y','20.00','opteron.jpg','21'],
['Opteron 244 (1.80 Ghz)','1','N','Y','39.50','opteron.jpg','22'],
['Opteron 250 (2.40 Ghz)','1','N','Y','100.00','opteron.jpg','0'],
['Opteron 252 (2.60 Ghz)','1','N','Y','120.00','opteron.jpg','24'],
['Opteron 265 (1.80 Ghz)','1','Y','Y','125.50','opteron.jpg','29'],
['Opteron 270 (2.00 Ghz)','1','Y','Y','150.00','opteron.jpg','30'],
['Pentium 4 HT (2.80 Ghz)','2','N','N','12.50','p4.jpg','26'],
['Pentium 4 HT (3.00 Ghz)','2','N','N','12.50','p4.jpg','1'],
['Pentium D 820 (2.80 Ghz)','2','Y','N','17.50','pd.jpg','3']
];

function showCPUs(f) {
var item = "<strong>Please select A CPU from below</strong>"
for (var i=1; i<cpuItem.length; i++) {
if (f.cpuBrand.value == cpuItem[1]
&& f.dualCore.value == cpuItem[2]
&& f.dualProcessor.value == cpuItem[3]) {
item += '<br><input type="radio" name="selectedCPU" value="'
+cpuItem[5]+'"onClick="setCpu('
+cpuItem[4]+',\''+cpuItem[0]+'\')" >'
+cpuItem[0];
}
}
document.getElementById("cpuName").innerHTML = item;
}
</script>
</head>
<body>
<form>
<select name="cpuBrand">
<option value="1" selected>1</option>
<option value="2">2</option>
</select>
<select name="dualCore">
<option value="Y" selected>Y</option>
<option value="N">N</option>
</select>
<select name="dualProcessor">
<option value="Y" selected>Y</option>
<option value="N">N</option>
</select>
<input type="button" onclick="showCPUs(this.form)" value="showCPUs">
</form>
<div id="cpuName"
style="border-style:solid;padding:1em;width:20em">cpuName</div>
</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top