Arrival:
Departure:
Adults: Children:
var date = new Date(); var mm = String(date.getMonth() + 1).padStart(2, '0'); var dd = String(date.getDate()).padStart(2, '0'); var yyyy = date.getFullYear(); var today = yyyy + '-' + mm + '-' + dd; var arr = document.getElementById('arrival'); var arrT = document.getElementById('arrivalT'); var arrM = document.getElementById('arrivalM'); var dep = document.getElementById('departure'); var depT = document.getElementById('departureT'); var depM = document.getElementById('departureM'); arr.value = today; dep.value = today; arrT.value = today; depT.value = today; arrM.value = today; depM.value = today; function post(path, params, method='post') { // The rest of this code assumes you are not using a library. // It can be made less wordy if you use one. const form = document.createElement('form'); form.method = method; form.action = path; for (const key in params) { if (params.hasOwnProperty(key)) { const hiddenField = document.createElement('input'); hiddenField.type = 'hidden'; hiddenField.name = key; hiddenField.value = params[key]; form.appendChild(hiddenField); } } document.body.appendChild(form); form.submit(); } function sendRequest() { var arrival = document.getElementById('arrival'); var departure = document.getElementById('departure'); var adults = document.getElementById('adults'); var childrens = document.getElementById('childrens'); var aD = new Date(arrival.value); var dD = new Date(departure.value); var data = { CIM: aD.getMonth() + 1, CID: aD.getDate(), CIY: aD.getFullYear(), COM: dD.getMonth() + 1, COD: dD.getDate(), COY: dD.getFullYear(), AD: adults.value, CH: childrens.value, RMS: 1, UF1: '', UF2: '', LG: '', }; post('https://us01.iqwebbook.com/TWPSCA670/Integration/Search', data); } function sendRequestT() { var arrival = document.getElementById('arrivalT'); var departure = document.getElementById('departureT'); var adults = document.getElementById('adultsT'); var childrens = document.getElementById('childrensT'); var aD = new Date(arrival.value); var dD = new Date(departure.value); var data = { CIM: aD.getMonth() + 1, CID: aD.getDate(), CIY: aD.getFullYear(), COM: dD.getMonth() + 1, COD: dD.getDate(), COY: dD.getFullYear(), AD: adults.value, CH: childrens.value, RMS: 1, UF1: '', UF2: '', LG: '', }; post('https://us01.iqwebbook.com/TWPSCA670/Integration/Search', data); } function sendRequestM() { var arrival = document.getElementById('arrivalM'); var departure = document.getElementById('departureM'); var adults = document.getElementById('adultsM'); var childrens = document.getElementById('childrensM'); var aD = new Date(arrival.value); var dD = new Date(departure.value); var data = { CIM: aD.getMonth() + 1, CID: aD.getDate(), CIY: aD.getFullYear(), COM: dD.getMonth() + 1, COD: dD.getDate(), COY: dD.getFullYear(), AD: adults.value, CH: childrens.value, RMS: 1, UF1: '', UF2: '', LG: '', }; post('https://us01.iqwebbook.com/TWPSCA670/Integration/Search', data); }
Arrival:
Departure:
Adults: Children:
Arrival:
Departure:
Adults:
Children:
Scroll to Top