2017-04-04 70 views
0

我有一個表單(預訂引擎),它收集客戶的信息以找到要租用的假期房間。它將數據傳輸到TravelClick(TC)系統。 TC系統中的某些部分發生了變化,現在預訂引擎並不總是傳遞數據。大約1/10的數據將正確提交給TC,頁面將顯示可用的房間信息。如果您刷新頁面或關閉並返回,請選擇相同日期,但不會傳遞表單數據,並且TC頁面會顯示默認頁面,供您選擇日期。 TC拒絕查看我們必須嘗試查看問題的代碼,他們拒絕對發送的文檔中的代碼進行故障排除。沒有出現任何錯誤。我試圖讓這個工作成爲一種損失。 這裏是表單的HTML代碼(建於RSForm爲Joomla):表單並不總是將數據傳遞給TravelClick

<form method="post" id="userForm" name="resform" onsubmit="return false;" action="https://bookings.ihotelier.com/Vista-Cay-Resort-by-Millenium/bookings.jsp"> 
<!-- Do not remove this ID, it is used to identify the page so that the pagination script can work correctly --> 
<fieldset class="uk-form uk-form-horizontal formContainer" id="rsform_8_page_0"> 
<div class="uk-form-row rsform-block rsform-block-datein"> 
     <label class="uk-form-label control-label formControlLabel" data-uk-tooltip="{pos:'top-left'}" title="" for="DateIn">Check-In:<br><span style="font-size: 75%;">(mm/dd/yyyy)</span></label> 
     <div class="uk-form-controls formControls"> 
      <input id="txtcal8_0" name="form[DateIn]" type="text" value="" class="rsform-calendar-box rsform-calendar-box"><input id="btn8_0" type="button" value="View Calendar" class="rsform-calendar-box btnCal rsform-calendar-button uk-button uk-button-default" onclick="RSFormPro.YUICalendar.showHideCalendar('cal8_0Container');"><div id="cal8_0Container" style="clear:both;display:none;position:absolute;z-index:9997"></div> 
<input id="hiddencal8_0" type="hidden" name="hidden[8_DateIn]"><span class="formValidation"><span id="component61" class="formNoError">Invalid Input</span></span>    
     </div> 
    </div> 
    <div class="uk-form-row rsform-block rsform-block-dateout"> 
     <label class="uk-form-label control-label formControlLabel" data-uk-tooltip="{pos:'top-left'}" title="" for="DateOut">Check-Out:<br><span style="font-size: 75%;">(mm/dd/yyyy)</span></label> 
     <div class="uk-form-controls formControls"> 
      <input id="txtcal8_1" name="form[DateOut]" type="text" value="" class="rsform-calendar-box rsform-calendar-box"><input id="btn8_1" type="button" value=" View Calendar" class="rsform-calendar-box btnCal rsform-calendar-button uk-button uk-button-default" onclick="RSFormPro.YUICalendar.showHideCalendar('cal8_1Container');"><div id="cal8_1Container" style="clear:both;display:none;position:absolute;z-index:9996"></div> 
<input id="hiddencal8_1" type="hidden" name="hidden[8_DateOut]"><span class="formValidation"><span id="component62" class="formNoError">Invalid Input</span></span>    
     </div> 
    </div> 
    <div class="uk-form-row rsform-block rsform-block-adults"> 
     <label class="uk-form-label control-label formControlLabel" data-uk-tooltip="{pos:'top-left'}" title="" for="Adults">Adults:</label> 
     <div class="uk-form-controls formControls"> 
      <select name="form[Adults][]" id="Adults" class="rsform-select-box"><option value="1">1</option> 
<option value="2">2</option> 
<option value="3">3</option> 
<option value="4">4</option></select><span class="formValidation"><span id="component64" class="formNoError">Invalid Input</span></span>     
     </div> 
    </div> 
    <div class="uk-form-row rsform-block rsform-block-children"> 
     <label class="uk-form-label control-label formControlLabel" data-uk-tooltip="{pos:'top-left'}" title="" for="Children">Children:</label> 
     <div class="uk-form-controls formControls"> 
      <select name="form[Children][]" id="Children" class="rsform-select-box"><option value="0">0</option> 
<option value="1">1</option> 
<option value="2">2</option> 
<option value="3">3</option> 
<option value="4">4</option></select><span class="formValidation"><span id="component65" class="formNoError">Invalid Input</span></span>     
     </div> 
    </div> 
    <div class="uk-form-row rsform-block rsform-block-submit"> 
     <label class="uk-form-label control-label formControlLabel" data-uk-tooltip="{pos:'top-left'}" title="" for="Submit"></label> 
     <div class="uk-form-controls formControls"> 
      <input type="submit" name="form[Submit]" id="Submit" onclick="postIHForm (document.resform)" class="button button-2 button-xsmall" value="Book Now"><span class="formValidation"></span>     
     </div> 
    </div> 
    <input type="hidden" name="form[HotelID]" id="HotelID" value="14939"><input type="hidden" name="form[Length]" id="Length" value=""> 
</fieldset> 
<input type="hidden" name="form[formId]" value="8"> 
</form> 

這裏是JavaScript代碼發送表單數據TC:

<script> 
function postIHForm(oForm){ 
    var qs = ""; 

    qs = qs + "?hotelid=" + document.getElementById("HotelID").value; 
    if (oForm.LanguageID) { qs = qs + "&languageid=" + oForm.LanguageID.value} 
    qs = qs + "&datein=" + document.getElementById("txtcal8_0").value; 
    if (document.getElementById("Length")) { qs = qs + "&length=" + document.getElementById("Length").value } 
    if (document.getElementById("txtcal5_1")) { qs = qs + "&dateout=" + document.getElementById("txtcal8_1").value } 
    qs = qs + "&Adults=" + document.getElementById("Adults").value; 
    if (document.getElementById("Children")) { qs = qs + "&children=" + document.getElementById("Children").value } 
     var target = 'https://booking.ihotelier.com/istay/istay.jsp' + qs; 
     var be_link = ""; 
     ga(function(tracker) { 
      var linker = new window.gaplugins.Linker(tracker); 
      be_link = linker.decorate(target); 
     }); 
     window.open(be_link); 
} 
</script> 

操作:https://bookings.ihotelier.com/Vista-Cay-Resort-by-Millenium/bookings.jsp

其他HTML屬性:onsubmit =「返回false;」

您是否發現任何不正確的內容或者爲什麼表單不會將數據傳遞給TC?

+0

是否超時? – johnny

+0

不是我能說的。這一切都在一兩秒內發生 – am2781

回答