JavaScript how to add total cost based on the item selected from different tabs total cost based on,total cost activity based costing,total

i have two tabs, one shows some hotel names from one location and other tab shows some hotels from another location.

and when i select one hotel from one tab and then another from another tab. the total should be hotel_location1 + hotel_location2.

here is my code:

for tabs:

<div class="tabs-x tabs-left">
<ul id="myTab-kv-13" class="nav nav-tabs" role="tablist">
<li class="active"><a target='_blank' href="#hotel-pb" role="tab" data-toggle="tab"><i class="fa fa-bed"></i> Port Blair</a></li>
<li><a target='_blank' href="#hotel-hl" role="tab-kv" data-toggle="tab"><i class="fa fa-bed"></i> Havelock</a></li>
</ul>
<div id="myTabContent-kv-13" class="tab-content">
<div class="tab-pane fade in active" id="hotel-pb">
<div class="col-md-3 col-xs-6">
<div class="panel panel-red">
<div class="panel-heading">velocity</div>
<div class="panel-body">
<img src="images/hotels/velocity.png" class="img-responsive"/>
<div class="my-caption">
<span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star-empty"></span><span class="glyphicon glyphicon-star-empty"></span></div>
<select name="hotel_cat" id="hotel_cat_1" class="form-control" onchange="hotel_rate()">
<option value="">Category</option>
<option value="Standard Rs: 2000">Standard Rs: 2000</option>
<option value="Deluxe Rs: 2200">Deluxe Rs: 2200</option>
<option value="Family Rs: 3000">Family Rs: 3000</option>
</select>
<input type="hidden" name="sel_cat_1" id="sel_cat_1"/>
<br />
<button class="btn btn-block btn-danger" name="add_this_1" id="add_this_1" data-hname="velocity" data-elem="1" onclick="total_rate()">Select</button>
<input type="hidden" name="em_1" id="em_1" value="800"/>
<input type="hidden" name="s_tax_1" id="s_tax_1" value="8.4"/>
</div>
</div>
</div>
<div class="col-md-3 col-xs-6">
<div class="panel panel-red">
<div class="panel-heading">White Coral</div>
<div class="panel-body">
<img src="images/hotels/White Coral.png" class="img-responsive"/>
<div class="my-caption">
<span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star-empty"></span><span class="glyphicon glyphicon-star-empty"></span></div>
<select name="hotel_cat" id="hotel_cat_2" class="form-control" onchange="hotel_rate()">
<option value="">Category</option>
<option value="Dlx Lake View Rs: 4500">Dlx Lake View Rs: 4500</option>
<option value="Dlx Mountain View Rs: 4000">Dlx Mountain View Rs: 4000</option>
<option value="Std Lake View Rs: 3500">Std Lake View Rs: 3500</option>
<option value="Std Mountain View Rs: 3000">Std Mountain View Rs: 3000</option>
</select>
<input type="hidden" name="sel_cat_2" id="sel_cat_2"/>
<br />
<button class="btn btn-block btn-danger" name="add_this_2" id="add_this_2" data-hname="White Coral" data-elem="2" onclick="total_rate()">Select</button>
<input type="hidden" name="em_2" id="em_2" value="800"/>
<input type="hidden" name="s_tax_2" id="s_tax_2" value="8.4"/>
</div>
</div>
</div>
<input  type="hidden" name="count" id="count" value="3"/>
</div>

<div class="tab-pane fade" id="hotel-hl">
<div class="col-md-3 col-xs-6">
<div class="panel panel-red">
<div class="panel-heading">blue bird resort</div>
<div class="panel-body">
<img src="images/hotels/blue bird resort.png" class="img-responsive"/>
<div class="my-caption">
<span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star"></span><span class="glyphicon glyphicon-star-empty"></span><span class="glyphicon glyphicon-star-empty"></span></div>
<select name="hotel_cat" id="hotel_cat" class="form-control" onchange="hotel_rate()">
<option value="">Category</option>
<option value="Standard Rs: 2000">Standard Rs: 2000</option>
</select>
<input type="hidden" name="sel_cat_3" id="sel_cat_3"/>
<br />
<button class="btn btn-block btn-danger" name="add_this_3" id="add_this_3" data-hname="blue bird resort" data-elem="3" onclick="total_rate()">Select</button>
<input type="hidden" name="em_3" id="em_3" value="800"/>
<input type="hidden" name="s_tax_3" id="s_tax_3" value="8.4"/>
</div>
</div>
</div>
</div>
</div>
</div>
Answer:1

Please be nice. My first question here. I'm learning JavaScript and jQuery. Google isn't much help because I don't know how to ask the right question. Need human intervention please. I'm trying to ...

Please be nice. My first question here. I'm learning JavaScript and jQuery. Google isn't much help because I don't know how to ask the right question. Need human intervention please. I'm trying to ...

  1. javascript variable equals function
  2. javascript variable equals or
  3. javascript variable equals function return
  4. javascript variable equals multiple values
  5. javascript variable equals another variable
  6. javascript variable equals true
  7. javascript variable equals string
  8. javascript variable equals
  9. javascript variable equals undefined
  10. javascript variable equals curly braces
  11. javascript variable equals null
  12. javascript variable equals array
  13. javascript variable equals switch
  14. javascript variable equals number
  15. js variable equals function
  16. js variable equals switch
  17. js variable equals or
  18. javascript variable comparison
  19. js variable comparison
  20. javascript if variable equals

new Array // outputs [] [] // outputs [] But new Array === [] is false. Why so? console.log(new Array === [])

new Array // outputs [] [] // outputs [] But new Array === [] is false. Why so? console.log(new Array === [])

I've written a function to turn a string such as 'aaazeeeee' into a new string of 'aaa z eeeee' this is the code I've tried that works const groupCharacters = signature => { let ...

I've written a function to turn a string such as 'aaazeeeee' into a new string of 'aaa z eeeee' this is the code I've tried that works const groupCharacters = signature => { let ...

  1. refactoring with function

Is it possibile to use an inline return with javascript map function? Instead of doing array.map(token => { var x=new Object(); x[token]=words[token]; return x;} ) I would like to do it inline as ...

Is it possibile to use an inline return with javascript map function? Instead of doing array.map(token => { var x=new Object(); x[token]=words[token]; return x;} ) I would like to do it inline as ...

  1. javascript inline function onclick
  2. javascript inline function call
  3. javascript inline function example
  4. javascript inline function with parameters
  5. javascript inline function scope
  6. javascript inline function syntax
  7. javascript inline function u003d
  8. javascript inline function html
  9. javascript inline function return value
  10. javascript inline function return object
  11. javascript inline function expression
  12. javascript inline function performance
  13. javascript inline function definition
  14. javascript inline function pass parameter
  15. javascript inline function variable scope
  16. javascript inline function callback
  17. javascript inline function call onclick
  18. javascript inline function return
  19. javascript inline function arrow
  20. javascript inline function event