Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming > Web Coding

Reply
 
LinkBack Thread Tools
Old 08-31-09   #1 (permalink)
Overclocker
 
shemer77's Avatar
 
intel nvidia

Join Date: Jan 2009
Location: behind you,MI
Posts: 467
Blog Entries: 2

Rep: 20 shemer77 is acknowledged by some
Unique Rep: 20
Folding Team Rank: 1117
Trader Rating: 2
Default Trying to get a little computer buildin website goin

so me and my friend are trying to build this website kinda like digital storms where people can select products and it shows the end price but we are failin, so we need some help
Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

</head>


<body>
<form method="post" name="addr" id="addr" onSubmit="return false;">
<p>Select your Hard Drive</p>
<select name="hdd" id="hdd" ;>
<option value="0">120 GB</option>
<option value="1">160 GB</option>
<option value="2">320 GB</option>
<option value="3">500 GB</option>
<option value="4">1 TB</option>
<option value="5">1.5 TB</option>
</select>
</form>



<form method="post" name="calc" id="calc" onSubmit="return false;">
<p>Select your Processor.</p>
<select name="num" id="num" onChange="addr();">
<option value="0">Intel Core 2 Duo 2.93GHz </option>
<option value="1">Intel Core 2 Duo 2.93GHz +$0</option>
<option value="2">Intel Core 2 Quad 2.33GHz +$30</option>
<option value="3">Intel Core 2 Quad 2.66GHz +$20</option>
<option value="4">Intel Core 2 Quad 2.83GHz +$150</option>
</select>
</form>

<script="text/javascript">
function addr() {
var cpuprices = new Array('0.00','119.99','149.99','169.99','349.99');
var form2 = document.forms["calc"];
var cpu = form2.elements["num"];
var cpuprice = cpu.value;
var c = cpuprices[cpuprice];
document.write(x);
}
</script>

</body>

</html>
all im trying to see if it can display the value of one set, can you guys help me out?
__________________
Don't worry about the world ending today; it's already tomorrow in New Zealand.

Life is too short to be bound by the moral, ethical and legal constraints imposed on us by modern day society. - 003
GO BIG OR GO HOME
"Wanting to be someone else is a waste of the person you are" (Kurt Cobain)
"Time you enjoy wasting, is not wasted time" - John Lennon.

System: First computer v2.35
CPU
Q9550@3.26
Motherboard
GA EP45-UD3P
Memory
4gb
Graphics Card
Evga 8600 gts
Hard Drive
239 GB Total
Power Supply
Corsair 750w
Case
RaidMax Smilodon
CPU cooling
Rocketfish bs
GPU cooling
Stock
OS
Windows 7 RC 7100 64bit
Monitor
Dell E198WFP 19 inch
shemer77 is offline I fold for Overclock.net   Reply With Quote
Old 09-02-09   #2 (permalink)
Overclocker
 
voltz's Avatar
 
intel ati

Join Date: Aug 2009
Location: Ireland
Posts: 77

Rep: 4 voltz Unknown
Unique Rep: 3
Trader Rating: 0
Default

Have you thought about using an e-Commerce CMS, it could save you alot of time, after all there's no point trying re-invent the wheel.

System: 24/7 workstation
CPU
E8500 E0 4.2Ghz @ 1.248v [I:39c-L:58c]
Motherboard
Gigabyte GA-EP45-DS3 [F9]
Memory
4x 2GB Corsair Dominator XMS2 PC2-8500 CL5
Graphics Card
Club3D HD3650, 512Mb
Hard Drive
WD 500GB, Samsung 1TB
Sound Card
Creative Sound Blaster (External)
Power Supply
Corsair TX650W
Case
Antec Solo
CPU cooling
Zalman CNPS 9700 Led
GPU cooling
Stock
OS
Windows 7 Ultimate x64
Monitor
ACD 20in [1680 x 1050]

Last edited by voltz : 09-05-09 at 01:54 PM
voltz is offline   Reply With Quote
Old 09-05-09   #3 (permalink)
Networking Nut
 
Lyoko's Avatar
 
intel nvidia

Join Date: Aug 2006
Posts: 2,198

Rep: 84 Lyoko is acknowledged by some
Unique Rep: 78
FAQs Submitted: 1
Trader Rating: 3
Default

Quote:
Originally Posted by voltz View Post
Have you thought about using an e-Commerce CMS, it could save you alot of time, after all there's know point trying re-invent the wheel.
Sums up my thoughts. shemer77, try out Zen Cart but make sure you have a server that meets the requirements.
Lyoko is offline   Reply With Quote
Old 09-08-09   #4 (permalink)
Overclocker in Training
 
darius_m5's Avatar
 
intel ati

Join Date: Sep 2008
Location: Toronto, Ontario
Posts: 103

Rep: 19 darius_m5 Unknown
Unique Rep: 16
Trader Rating: 0
Default

Here's your code with an onchange event that updates a <div> tag with the price, btw, your original code had two objects named addr, which probably didn't load the function correctly:

Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<form method="post" name="hd" id="addr" onSubmit="return false;">
<p>Select your Hard Drive</p>
<select name="hdd" id="hdd" ;>
<option value="0">120 GB</option>
<option value="1">160 GB</option>
<option value="2">320 GB</option>
<option value="3">500 GB</option>
<option value="4">1 TB</option>
<option value="5">1.5 TB</option>
</select>
</form>

<form method="post" name="calc" id="calc" onChange=addr()>
<p>Select your Processor.</p>
<select name="num" id="num" onChange="addr();">
<option value="0">Intel Core 2 Duo 2.93GHz </option>
<option value="1">Intel Core 2 Duo 2.93GHz +$0</option>
<option value="2">Intel Core 2 Quad 2.33GHz +$30</option>
<option value="3">Intel Core 2 Quad 2.66GHz +$20</option>
<option value="4">Intel Core 2 Quad 2.83GHz +$150</option>
</select>
</form>
<div id="price">
</div>
<script type="text/javascript">
function addr() {
var cpuprices = new Array('0.00','119.99','149.99','169.99','349.99');
var form2 = document.forms["calc"];
var cpu = form2.elements["num"];
var cpuprice = cpu.value;
var c = cpuprices[cpuprice];
document.getElementById("price").innerHTML = "<p>"+c+"</p>";
}
</script>
</body>

</html>
__________________
System: CM HAF 932
CPU
E8400
Motherboard
P5Q-Pro
Memory
OCZ 2x2GB PC2-8500
Graphics Card
Sapphire 4850
Hard Drive
2xWD 320GB Caviar
Power Supply
Enermax Infiniti 720W
Case
CM HAF 932
CPU cooling
OCZ Vendetta 2
GPU cooling
Accerlero S1
OS
Vista 64bit
Monitor
Samsung T200
darius_m5 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -5. The time now is 07:41 PM.


Overclock.net is a Carbon Neutral Site Creative Commons License

Terms of Service / Forum Rules | Privacy Policy | DMCA Info | Advertising | Become an Official Vendor
Copyright © 2009 Shogun Interactive Development. Most rights reserved.
Page generated in 0.11934 seconds with 8 queries