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
  [Help Needed] IG+CPA how to earn more? mdsajib 2 199 2018-08-04, 10:16 AM
Last Post: mdsajib
  Max Bounty/CPA with AdWords -- Help Needed grahammiranda13 8 631 2018-08-03, 05:29 AM
Last Post: CharlieHarper
  Needed help with cent os 7 PoS3!DoN 4 341 2018-03-31, 09:15 PM
Last Post: Innowebex
  Important YouTube Questions, EXPERIENCED answers needed :) Draguny 5 555 2018-03-27, 01:36 PM
Last Post: midastou4
  Help needed for Cloaking morgankrnskype 7 610 2018-03-19, 07:27 PM
Last Post: Ana_AdCombo





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

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