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

Over 35% Convertion Rate on OGads. Oldest video-service on the market EVERYWHERE.

Get these videos for FREE on my referral program or buy them on my sales thread

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
  KWfinder needed naathanz 10 859 2017-12-27, 06:15 PM
Last Post: bamoc1992
  Advice & Help needed :) Thanks MDaks 2 133 2017-12-19, 02:06 AM
Last Post: Necrozard
  Where should I put <script> tags in HTML? Pirata 5 263 2017-12-03, 11:38 AM
Last Post: Pirata
  UAE traffic is urgently needed. 1moneyman123 2 173 2017-10-25, 11:35 PM
Last Post: interwent
  Traffic needed for cpa offers naulodesign 7 438 2017-10-06, 01:50 AM
Last Post: stephanie12





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

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