Click here to Skip to main content
15,916,949 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
How to calculate rates in hotel for on click checkbox.
for example
i have 2 checkboxes.
1.extra room 2.pick up to airport (via.cab)
on selecting extaroom checkbox rates should be displayed and uncheck no rate should be displayed.
can any one help...
Posted
Comments
Richard C Bishop 22-Aug-13 9:52am    
What have you tried? Any code?

1 solution

According to you HTML mark up should be like

HTML
<div><input type="checkbox" id="ExtraRoom"/>Extra Room</div>
<input type="checkbox" id="PickUpToAirPort"/>Pick up to airport
<div id="RateChart" style="display:none">
    Rate Chart
----------------------------
Single bed room -  1000/-
Double bed room -  2000/-
Double bed Deluxe -  3000/-
</div>


Jquery code to above markup for displaying ratechart on selection of checkbox

JavaScript
$(document).ready(function(){
    $('#ExtraRoom').click(function() {
    $("#RateChart").toggle(this.checked);
});
});
 
Share this answer
 
Comments
Member 10192549 23-Aug-13 4:37am    
Good Afternoon Jitendra Sabat sir,
If you dont mind can you visit this site http://www.spreehotels.com/,there click on book now,you will get booking details,on click of anyone u will get one popup there rates will be changing.pls help me in jquery.........
Thanking You.
Jitendra Sabat 23-Aug-13 4:47am    
Where are your checkboxes.I did'nt find any one.Please clarify your question.
Member 10192549 23-Aug-13 5:40am    
Sir on clicking of BOOKNOW you will get one popup window there 3 checkboxes will display like
1.extra adult,2.extra child,3.airport pickup.after selecting any of checkbox the rates are calaculating and updating can you give jquery code for the check and check functionality.
pls help me sir,pls go to the site sir.
Jitendra Sabat 23-Aug-13 5:51am    
Sorry,i can't see any of your mentioned checkbox on popup.If you can ,please provide a screenshot.
Member 10192549 23-Aug-13 5:58am    
sir how can i send screenshot here there is no option......

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900