State Plaza Hotel, Book Washington Hotels Starting From ₹ 9292 (2024)

Check In

Check Out

'; roomhtml += '

'; roomhtml += ''; roomhtml += 'Adult (Above 12 years)'; roomhtml += '

'; roomhtml += '

'; roomhtml += '

'; roomhtml += '-'; roomhtml += '' + totalRoomDetails[room].split('_')[adult] + ''; //roomhtml += '+'; roomhtml += '+'; roomhtml += '

'; roomhtml += '

'; roomhtml += '

'; roomhtml += '

'; roomhtml += ''; roomhtml += 'Child (Below 12 years)'; roomhtml += '

'; roomhtml += '

'; roomhtml += '

'; //roomhtml += '-'; roomhtml += '-'; if (totalRoomDetails[room].split('_')[child] === undefined) { roomhtml += '0'; } else { roomhtml += '' + totalRoomDetails[room].split('_')[child] + ''; } roomhtml += '+'; roomhtml += '

'; roomhtml += '

'; roomhtml += '

'; roomhtml += '

'; //roomhtml += ''; //roomhtml += ''; if (totalRoomDetails[room].split('_')[childageone] === undefined) { roomhtml += ''; } else { roomhtml += ''; } if (totalRoomDetails[room].split('_')[childageTwo] === undefined) { roomhtml += ''; } else { roomhtml += ''; } roomhtml += '

'; roomhtml += '

'; room++; $("#roomcount").val(i); } if (TotalRoom >= 8) { $("#addhotelRoom").css("display", "none"); $("#removehotelRoom").css("display", "block"); } if (TotalRoom >= 2 && TotalRoom <= 8) { $("#addhotelRoom").css("display", "block"); $("#removehotelRoom").css("display", "block"); } if (TotalRoom == 1) { $("#removehotelRoom").css("display", "none"); } // $("#hdnroom").val(TotalRoom); //i have assign the Total Room count taking form first page $("#roomshtml").html(roomhtml); var roomcnt = $("#hdnroom").val(); if (parseInt(roomcnt) > 1) { for (var i = 2; i <= parseInt(roomcnt); i++) { setRoomsPanel(i) } } $('#divHotelPaxContent').fadeOut(); var TotalAdults = 0; TotalChild = 0, NumberOfPax = ""; //2_2_4_3?4_2_4_4?2 for (var room = 1; room <= TotalRoom; room++) { if (document.getElementById('Adults_room_' + room + '_' + room) != null && document.getElementById('Adults_room_' + room + '_' + room).innerHTML != "") TotalAdults += parseInt(document.getElementById('Adults_room_' + room + '_' + room).innerHTML); TotalChild += parseInt(document.getElementById('Children_room_' + room + '_' + room).innerHTML); NumberOfPax += parseInt(document.getElementById('Adults_room_' + room + '_' + room).innerHTML) + "_" + parseInt(document.getElementById('Children_room_' + room + '_' + room).innerHTML) + "_" + parseInt(document.getElementById('Child_Age_' + room + '_' + 1).value) + "_" + parseInt(document.getElementById('Child_Age_' + room + '_' + 2).value) + "?"; } $("#hdnroom").val(TotalRoom); document.getElementById("guestcount").innerHTML = TotalAdults + TotalChild; document.getElementById("guestroom").innerHTML = TotalRoom; setRoomsPaxPanel(); setroomandguestsMsg(); $("body").delegate(".hotelchildclass", "click", function () { if (/plus/i.test(this.id) && parseInt($("#" + this.id.substring(0, this.id.lastIndexOf("_") + 0)).html()) < 2) { $("#" + this.id.substring(0, this.id.lastIndexOf("_") + 0)).html(parseInt($("#" + this.id.substring(0, this.id.lastIndexOf("_") + 0)).html()) + 1); setroomandguestsMsg(); } else if (/minus/i.test(this.id) && parseInt($("#" + this.id.substring(0, this.id.lastIndexOf("_") + 0)).html()) > 0) { $("#" + this.id.substring(0, this.id.lastIndexOf("_") + 0)).html(parseInt($("#" + this.id.substring(0, this.id.lastIndexOf("_") + 0)).html()) - 1); setroomandguestsMsg(); } if (parseInt($("#" + this.id.substring(0, this.id.lastIndexOf("_") + 0)).html()) >= 0 && parseInt($("#" + this.id.substring(0, this.id.lastIndexOf("_") + 0)).html()) <= 2) { var currentchildcount = $("#" + this.id.substring(0, this.id.lastIndexOf("_") + 0)).html(); if (parseInt(currentchildcount) == 1) { $("#" + this.id.substring(0, this.id.lastIndexOf("_") + 0) + "_text").css("display", "block"); $("#Child_Age_" + this.id.split('_room')[1].split("_")[1] + "_1").css("display", "inline"); $("#Child_Age_" + this.id.split('_room')[1].split("_")[1] + "_2").css("display", "none"); } else if (parseInt(currentchildcount) == 2) { $("#Child_Age_" + this.id.split('_room')[1].split("_")[1] + "_1").css("display", "inline"); $("#Child_Age_" + this.id.split('_room')[1].split("_")[1] + "_2").css("display", "inline"); } else if (parseInt(currentchildcount) == 0) { $("#" + this.id.substring(0, this.id.lastIndexOf("_") + 0) + "_text").css("display", "none"); $("#Child_Age_" + this.id.split('_room')[1].split("_")[1] + "_1").css("display", "none"); $("#Child_Age_" + this.id.split('_room')[1].split("_")[1] + "_2").css("display", "none"); } } }); $("body").delegate(".hoteladultclass", "click", function () { if (/plus/i.test(this.id) && parseInt($("#" + this.id.substring(0, this.id.lastIndexOf("_") + 0)).html()) < 12) { $("#" + this.id.substring(0, this.id.lastIndexOf("_") + 0)).html(parseInt($("#" + this.id.substring(0, this.id.lastIndexOf("_") + 0)).html()) + 1); setroomandguestsMsg(); } else if (/minus/i.test(this.id) && parseInt($("#" + this.id.substring(0, this.id.lastIndexOf("_") + 0)).html()) > 1) { $("#" + this.id.substring(0, this.id.lastIndexOf("_") + 0)).html(parseInt($("#" + this.id.substring(0, this.id.lastIndexOf("_") + 0)).html()) - 1); setroomandguestsMsg(); } }); $("#addhotelRoom").click(function () { $("#hdnroom").val(TotalRoom); // var oldroomcnt = $("#hdnroom").val(); var oldroomcnt = TotalRoom; var roomcount = TotalRoom + 1; $("#roomcount").val(roomcount); $("#removehotelRoom").css("display", "block"); if (parseInt(oldroomcnt) < 13) { var roomhtml = ""; roomhtml += '

'; $("#roomshtml").append(roomhtml); $("#hdnroom").val(roomcount); $("#divroom" + roomcount).slideDown(500); setroomandguestsMsg(); if (roomcount == 9) { $("#addhotelRoom").css("display", "none"); } } else { $("#addhotelRoom").css("display", "none"); } TotalRoom = roomcount; }); $("#removehotelRoom").click(function () { $("#hdnroom").val(TotalRoom); $("#roomcount").val(TotalRoom - 1); if (parseInt(TotalRoom) > 1) { $("#divroom" + TotalRoom).slideUp('300', function () { $(this).remove(); }) $("#hdnroom").val(TotalRoom - 1); TotalRoom--; setroomandguestsMsg(); if (TotalRoom == 1) { $("#removehotelRoom").css("display", "none"); $("#addhotelRoom").css("display", "block"); } else if (TotalRoom == 8) { $("#addhotelRoom").css("display", "block"); } } /// This os old //var roomcnt = $("#hdnroom").val(); //if (parseInt(roomcnt) > 1) { // $("#divroom" + roomcnt).slideUp('300', function () { $(this).remove(); }) // $("#hdnroom").val(parseInt($("#hdnroom").val()) - 1); // setroomandguestsMsg(); // if (parseInt($("#hdnroom").val()) == 1) { // $("#removehotelRoom").css("display", "none"); // $("#addhotelRoom").css("display", "block"); // } // else if (parseInt($("#hdnroom").val()) == 3) { // $("#addhotelRoom").css("display", "block"); // } //} //Close }); $("#exithotelroom").click(function () { $('#divHotelPaxContent').fadeOut(); var TotalAdults = 0; TotalChild = 0, NumberOfPax = ""; //2_2_4_3?4_2_4_4?2 for (var room = 1; room <= TotalRoom; room++) { TotalAdults += parseInt(document.getElementById('Adults_room_' + room + '_' + room).innerHTML); TotalChild += parseInt(document.getElementById('Children_room_' + room + '_' + room).innerHTML); NumberOfPax += parseInt(document.getElementById('Adults_room_' + room + '_' + room).innerHTML) + "_" + parseInt(document.getElementById('Children_room_' + room + '_' + room).innerHTML) + "_" + parseInt(document.getElementById('Child_Age_' + room + '_' + 1).value) + "_" + parseInt(document.getElementById('Child_Age_' + room + '_' + 2).value) + "?"; } $("#hdnroom").val(TotalRoom); document.getElementById("guestroom").innerHTML = TotalRoom; document.getElementById("guestcount").innerHTML = TotalAdults + TotalChild;// + " Person " + TotalRoom + " Room"; }); function setroomandguestsMsg() { var roomcount = $("#hdnroom").val(); var roomguestmsg = ""; var guestcount = "0"; for (var i = 1; i <= parseInt(roomcount); i++) { guestcount = parseInt(guestcount) + parseInt($("#Adults_room_" + i + "_" + i + "").html()); guestcount = parseInt(guestcount) + parseInt($("#Children_room_" + i + "_" + i + "").html()); } if (parseInt(roomcount) > 1) { roomguestmsg += roomcount + ", "; } else { roomguestmsg += roomcount + " " + ", "; } if (parseInt(guestcount) > 1) { roomguestmsg += guestcount + " " + " "; } else { roomguestmsg += guestcount + " " + " "; } $("#lblroomSelectionMsg").html(roomguestmsg); } function setRoomsPanel(roomcount) { var roomhtml = ""; roomhtml += '

'; roomhtml += '

Room ' + roomcount + ':

'; roomhtml += '

'; roomhtml += ''; roomhtml += 'Adult (Above 12 years)'; roomhtml += '

'; roomhtml += '

'; roomhtml += '

'; roomhtml += '-'; roomhtml += '2'; roomhtml += '+'; roomhtml += '

'; roomhtml += '

'; roomhtml += '

'; roomhtml += '

'; roomhtml += ''; roomhtml += 'Child (Below 12 years)'; roomhtml += '

'; roomhtml += '

'; roomhtml += '

'; roomhtml += '-'; roomhtml += '0'; roomhtml += '+'; roomhtml += '

'; roomhtml += '

'; roomhtml += '

'; roomhtml += '

'; roomhtml += ''; roomhtml += ' '; roomhtml += '

'; roomhtml += '

'; $("#roomshtml").append(roomhtml); $("#removehotelRoom").css("display", "block"); if (roomcount == 4) { $("#addhotelRoom").css("display", "none"); } } function setRoomsPaxPanel() { if ($("#hdnPaxInfo").val() != undefined) { var PaxInfo = $("#hdnPaxInfo").val(); var roomcnt = TotalRoom;//var roomcnt = $("#hdnroom").val(); var arraypax = []; arraypax = PaxInfo.split('|'); for (var i = 1; i <= parseInt(roomcnt); i++) { for (var z = 1; z < arraypax.length; z++) { $("#Adults_room_" + i + "_" + z + "").text(arraypax[parseInt(z) - 1].split('$')[0].split('-')[0].length); if (arraypax[parseInt(z) - 1].split('$')[0].indexOf('C') > 0) { var childlen = arraypax[parseInt(z) - 1].split('$')[0].split('-')[1].length; if (childlen > 0) { for (var zz = 1; zz <= childlen; zz++) { if (zz == 1) { $("#Children_room_" + i + "_" + z + "").text(childlen) $("#Children_room_" + i + "_" + z + "_text").css("display", "block"); } $("#Child_Age_" + z + "_" + zz + "").css("display", "block"); $("#Child_Age_" + z + "_" + zz + "").val(arraypax[parseInt(z) - 1].split('$')[1].split(',')[parseInt(zz) - 1]); } } } } } } } });

State Plaza Hotel, Book Washington Hotels Starting From ₹ 9292 (2024)
Top Articles
Latest Posts
Article information

Author: Saturnina Altenwerth DVM

Last Updated:

Views: 6533

Rating: 4.3 / 5 (44 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Saturnina Altenwerth DVM

Birthday: 1992-08-21

Address: Apt. 237 662 Haag Mills, East Verenaport, MO 57071-5493

Phone: +331850833384

Job: District Real-Estate Architect

Hobby: Skateboarding, Taxidermy, Air sports, Painting, Knife making, Letterboxing, Inline skating

Introduction: My name is Saturnina Altenwerth DVM, I am a witty, perfect, combative, beautiful, determined, fancy, determined person who loves writing and wants to share my knowledge and understanding with you.