Help Needed With HTML/CSS
2014-05-06, 03:22 AM,
#1
So I am creating a site for my new plans, and I have ate the whole web to find how I can make a dropdown menu in html/css3.

I would like to create 2 seperate dropdown menus and each time something different is pick the outcome can change, for example you wanna buy clothes online you picked a t-shirt and a jacket, then it shows the full price of both combined.

It's really late and I'm sleepy to explain it so have an example below.

what exactly I want is something like this Example.

The problem is that I can't find any tutorial to create one of my own.

Any help would be appreciated.

[Image: H6JU6ed.png?1]
Reply
Share This Thread :

2014-05-06, 03:30 AM,
#2
I don't know exactly the code but that requires javascript to make an aritmethic function


Reply
2014-05-06, 03:35 AM, (This post was last modified: 2014-05-06, 03:39 AM by Skouti.)
#3
(2014-05-06, 03:30 AM)Pachu Wrote: I don't know exactly the code but that requires javascript to make an aritmethic function

Could you please guide me at what am I supposed to search on google to get a tutorial about this?

[Image: H6JU6ed.png?1]
Reply
2014-05-06, 03:58 AM,
#4
Here is some quick code:

Code:
Cloth:
<select id="cloth" onchange="comboChange()">
  <option value="5">Jacket 1</option>
  <option value="10">CPA Elite T-Shirt</option>
  <option value="15">Trousers</option>
</select>
<br /><br />
Shoes:
<select id="shoes" onchange="comboChange()">
  <option value="35">Nike snickers</option>
  <option value="40">WinX snickers</option>
  <option value="45">TMNT sandals</option>
</select>
<br /><br />
<div id="price">Sum: $0</div>

<script>
function comboChange() {
    var firstvalue = document.getElementById("cloth").value;
    var secondvalue = document.getElementById("shoes").value;
    var total = Number(firstvalue) + Number(secondvalue);
    document.getElementById("price").innerHTML = "Sum: $" + total;
        
}
</script>

Hope it's what you need.
Latest Thanks - View all

Skouti(2014-05-06 04:13 AM) 
Reply
2014-05-06, 04:13 AM,
#5
(2014-05-06, 03:58 AM)Velocity Wrote: Here is some quick code:

Code:
Cloth:
<select id="cloth" onchange="comboChange()">
  <option value="5">Jacket 1</option>
  <option value="10">CPA Elite T-Shirt</option>
  <option value="15">Trousers</option>
</select>
<br /><br />
Shoes:
<select id="shoes" onchange="comboChange()">
  <option value="35">Nike snickers</option>
  <option value="40">WinX snickers</option>
  <option value="45">TMNT sandals</option>
</select>
<br /><br />
<div id="price">Sum: $0</div>

<script>
function comboChange() {
    var firstvalue = document.getElementById("cloth").value;
    var secondvalue = document.getElementById("shoes").value;
    var total = Number(firstvalue) + Number(secondvalue);
    document.getElementById("price").innerHTML = "Sum: $" + total;
        
}
</script>

Hope it's what you need.

Thanks mate, it's not exactly what I need but I think I can work around it and get some experience!!!

[Image: H6JU6ed.png?1]
Reply


Related Threads
Thread Author Replies Views Last Post
  shared hosting suggestion needed CPATracker 2 184 2018-11-11, 03:51 PM
Last Post: fufaji
  KWfinder needed naathanz 11 1,748 2018-11-07, 02:20 AM
Last Post: sangtaogifts03
  Help needed, please (cpa + seo) Triplex 1 282 2018-09-04, 03:54 PM
Last Post: Nem
  [Help Needed] IG+CPA how to earn more? mdsajib 2 363 2018-08-04, 10:16 AM
Last Post: mdsajib
  Max Bounty/CPA with AdWords -- Help Needed grahammiranda13 8 922 2018-08-03, 05:29 AM
Last Post: CharlieHarper





About Us | Contact Us | CPA Elites | Advertise | Stats

© 2013-2018 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top