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

HQ Video service, oldest one at CPAElites

Sample --> https://www.youtube.com/watch?v=TfLlDLYF28g

Hire service here
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


Possibly Related Threads...
Thread Author Replies Views Last Post
  Traffic needed for cpa offers naulodesign 7 298 2017-10-06, 01:50 AM
Last Post: stephanie12
  No conversion help needed total newbie naulodesign 3 170 2017-09-21, 12:58 PM
Last Post: PRINC3
  Needed help with cent os 7 PoS3!DoN 3 90 2017-09-15, 12:23 AM
Last Post: GopherDomains
  Please!!! Suggestions needed for more online business models (cpa apart!)? HAkorehdeh 3 98 2017-09-03, 11:25 AM
Last Post: Watt
  Fraudfilter Campaign Setting Error - Urgent Help Needed. intkhab 2 183 2017-08-08, 01:53 PM
Last Post: intkhab




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

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