Note that there are some explanatory texts on larger screens.

plurals
  1. POajax jqueryUI large table IE8 internet explorer slow
    text
    copied!<p>I am now stumped on this and I need help. I am pulling in a large html table via AJAX (circa 250 rows, 15 columns) 7 Columns of each row contain further subtables which are hidden within a div in the cell and shown on hover when a cell is hovered (further data to show)</p> <p>All working great across all recent browsers (IE9, FF, Chrome). I started adding datatables jquery plugin in order to be able to dynamically sort columns etc, this worked fine too.</p> <p>I then realized users of this app will be using IE8 through a virtualised OS, so I started testing. Straight away, I noticed issues when testing under IE8 in virtualbox on my dev laptop.</p> <p>What seems to happen is that first time when an ajax request is sent, browser gathers the data returned and renders it on screen reasonably fast. If i then try and resubmit the form with same data, browser will hang for a while, and then come up with "This script is taking too long to process... do you wish to..."</p> <p>So I started butchering my pages to try and see what is causing this slowdown. Seems like IE chokes on the table second time round and displays the erro message, but why!?!?</p> <p>I followed MSN's advice on optimising tables for IE rendering, and I have added fixed width for this table as well as subtables, i have also added <code>&lt;colgroups&gt;</code>. This has minimal impact.</p> <p>Soon after I realised that if I remove the call for JQuery UI in my scripts, the error would go away, and IE8 under virtualbox would render each ajax response without issues!</p> <p>So, can someone offer some advice as to WHY oh WHY including JQueryUI causes an ajax table to load incredibly slow and fudge up the browser.</p> <p>BTW - only reason why jqueryUI is there is becuase I am using the JQueryUI datepicker in my search form. As far as I am aware, JQueryUI shouldnt interfere with IE's rendering process, however it seems that it does!</p> <p>Find below code samples of ajax request:</p> <p>when "search is clicked" after server returns a response "data" will contain a long string with a table in it:</p> <pre><code>$.get("&lt;?= config_item('base_url') ?&gt;"+linky, $("#quote").serialize(), function(data) { //$("#quoteresults").show(); $("#ajaxloading").hide(); //$("#ajaxloadingscr").hide(); //alert(data); $('#dvResult').html(data); }); </code></pre> <p>here's some sample data, this is ONE row from my table...</p> <pre><code>&lt;tr&gt; &lt;td&gt;&lt;a target="_blank" href="\Anantara Bo Phut"&gt;&lt;img src="/assets/images/contractlink.png"&gt;&lt;/a&gt; &lt;span class="result_HotelName"&gt;Anantara Bophut Resort and Spa&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;a target="_blank" onClick="fnLoadRoomData('5173')" class="result_RoomName"&gt;Anantara Suite&lt;/a&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;2&lt;/td&gt; &lt;td&gt;BB&lt;/td&gt; &lt;td nowrap="nowrap" align="right" class="result_PricePound"&gt;£0.00&lt;/td&gt; &lt;td nowrap="nowrap" align="right"&gt;&lt;div class="containerprice"&gt; &lt;div class="pricedate"&gt;&lt;span class="result_Price"&gt;THB 0.00&lt;/span&gt;&lt;/div&gt; &lt;div class="pricext"&gt; &lt;table class="subtable" style="table-layout:fixed;" width="600" border="0"&gt; &lt;colgroup&gt; &lt;col&gt; &lt;col&gt; &lt;col&gt; &lt;col&gt; &lt;col&gt; &lt;/colgroup&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td colspan="3"&gt;Anantara Bophut Resort and Spa - Anantara Suite - #2013-08-08#&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;STD Total&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;0&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="3"&gt;&lt;table style="table-layout:fixed;" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td nowrap="nowrap"&gt;Age 35 (1)&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (2)&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td nowrap="nowrap"&gt;0&lt;/td&gt; &lt;td nowrap="nowrap"&gt;0&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;div class="containerprice"&gt; &lt;div class="pricedate"&gt;&lt;a href="" class="price_normal"&gt;0&lt;/a&gt;&lt;/div&gt; &lt;div class="pricext"&gt; &lt;table class="subtable" width="600" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td colspan="5"&gt;Anantara Bophut Resort and Spa - Anantara Suite - #2013-08-02#&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Total&lt;/td&gt; &lt;td&gt;STD Rate&lt;/td&gt; &lt;td&gt;STD Supps&lt;/td&gt; &lt;td&gt;SNG&lt;/td&gt; &lt;td&gt;Extra&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="" class="price_normal"&gt;0&lt;/a&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;0&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="5"&gt;&lt;table width="100%" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td nowrap="nowrap"&gt;Age 35 (1)&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (1) Supps&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (2)&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (2) Supps&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="5"&gt;2 2 2# Age 35 2 # EBO I(-15.00%PP) = -0&lt;br&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;StdOcc: 2&lt;/td&gt; &lt;td&gt;AdultBasis: PR&lt;/td&gt; &lt;td&gt;AdultAgeFrom: 12&lt;/td&gt; &lt;td colspan="2"&gt;RoomBoardCode: BB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;RoomID: 5173&lt;/td&gt; &lt;td&gt;ContractID: 511&lt;/td&gt; &lt;td colspan="2"&gt;Total: &lt;span class="grandtotal"&gt;0&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;div class="containerprice"&gt; &lt;div class="pricedate"&gt;&lt;a href="" class="price_normal"&gt;0&lt;/a&gt;&lt;/div&gt; &lt;div class="pricext"&gt; &lt;table class="subtable" width="600" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td colspan="5"&gt;Anantara Bophut Resort and Spa - Anantara Suite - #2013-08-03#&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Total&lt;/td&gt; &lt;td&gt;STD Rate&lt;/td&gt; &lt;td&gt;STD Supps&lt;/td&gt; &lt;td&gt;SNG&lt;/td&gt; &lt;td&gt;Extra&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="" class="price_normal"&gt;0&lt;/a&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;0&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="5"&gt;&lt;table width="100%" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td nowrap="nowrap"&gt;Age 35 (1)&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (1) Supps&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (2)&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (2) Supps&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="5"&gt;2 2 2# Age 35 2 # EBO I(-15.00%PP) = -0&lt;br&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;StdOcc: 2&lt;/td&gt; &lt;td&gt;AdultBasis: PR&lt;/td&gt; &lt;td&gt;AdultAgeFrom: 12&lt;/td&gt; &lt;td colspan="2"&gt;RoomBoardCode: BB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;RoomID: 5173&lt;/td&gt; &lt;td&gt;ContractID: 511&lt;/td&gt; &lt;td colspan="2"&gt;Total: &lt;span class="grandtotal"&gt;0&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;div class="containerprice"&gt; &lt;div class="pricedate"&gt;&lt;a href="" class="price_normal"&gt;0&lt;/a&gt;&lt;/div&gt; &lt;div class="pricext"&gt; &lt;table class="subtable" width="600" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td colspan="5"&gt;Anantara Bophut Resort and Spa - Anantara Suite - #2013-08-04#&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Total&lt;/td&gt; &lt;td&gt;STD Rate&lt;/td&gt; &lt;td&gt;STD Supps&lt;/td&gt; &lt;td&gt;SNG&lt;/td&gt; &lt;td&gt;Extra&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="" class="price_normal"&gt;0&lt;/a&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;0&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="5"&gt;&lt;table width="100%" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td nowrap="nowrap"&gt;Age 35 (1)&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (1) Supps&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (2)&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (2) Supps&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="5"&gt;2 2 2# Age 35 2 # EBO I(-15.00%PP) = -0&lt;br&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;StdOcc: 2&lt;/td&gt; &lt;td&gt;AdultBasis: PR&lt;/td&gt; &lt;td&gt;AdultAgeFrom: 12&lt;/td&gt; &lt;td colspan="2"&gt;RoomBoardCode: BB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;RoomID: 5173&lt;/td&gt; &lt;td&gt;ContractID: 511&lt;/td&gt; &lt;td colspan="2"&gt;Total: &lt;span class="grandtotal"&gt;0&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;div class="containerprice"&gt; &lt;div class="pricedate"&gt;&lt;a href="" class="price_normal"&gt;0&lt;/a&gt;&lt;/div&gt; &lt;div class="pricext"&gt; &lt;table class="subtable" width="600" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td colspan="5"&gt;Anantara Bophut Resort and Spa - Anantara Suite - #2013-08-05#&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Total&lt;/td&gt; &lt;td&gt;STD Rate&lt;/td&gt; &lt;td&gt;STD Supps&lt;/td&gt; &lt;td&gt;SNG&lt;/td&gt; &lt;td&gt;Extra&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="" class="price_normal"&gt;0&lt;/a&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;0&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="5"&gt;&lt;table width="100%" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td nowrap="nowrap"&gt;Age 35 (1)&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (1) Supps&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (2)&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (2) Supps&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="5"&gt;2 2 2# Age 35 2 # EBO I(-15.00%PP) = -0&lt;br&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;StdOcc: 2&lt;/td&gt; &lt;td&gt;AdultBasis: PR&lt;/td&gt; &lt;td&gt;AdultAgeFrom: 12&lt;/td&gt; &lt;td colspan="2"&gt;RoomBoardCode: BB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;RoomID: 5173&lt;/td&gt; &lt;td&gt;ContractID: 511&lt;/td&gt; &lt;td colspan="2"&gt;Total: &lt;span class="grandtotal"&gt;0&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;div class="containerprice"&gt; &lt;div class="pricedate"&gt;&lt;a href="" class="price_normal"&gt;0&lt;/a&gt;&lt;/div&gt; &lt;div class="pricext"&gt; &lt;table class="subtable" width="600" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td colspan="5"&gt;Anantara Bophut Resort and Spa - Anantara Suite - #2013-08-06#&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Total&lt;/td&gt; &lt;td&gt;STD Rate&lt;/td&gt; &lt;td&gt;STD Supps&lt;/td&gt; &lt;td&gt;SNG&lt;/td&gt; &lt;td&gt;Extra&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="" class="price_normal"&gt;0&lt;/a&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;0&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="5"&gt;&lt;table width="100%" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td nowrap="nowrap"&gt;Age 35 (1)&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (1) Supps&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (2)&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (2) Supps&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="5"&gt;2 2 2# Age 35 2 # EBO I(-15.00%PP) = -0&lt;br&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;StdOcc: 2&lt;/td&gt; &lt;td&gt;AdultBasis: PR&lt;/td&gt; &lt;td&gt;AdultAgeFrom: 12&lt;/td&gt; &lt;td colspan="2"&gt;RoomBoardCode: BB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;RoomID: 5173&lt;/td&gt; &lt;td&gt;ContractID: 511&lt;/td&gt; &lt;td colspan="2"&gt;Total: &lt;span class="grandtotal"&gt;0&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;div class="containerprice"&gt; &lt;div class="pricedate"&gt;&lt;a href="" class="price_normal"&gt;0&lt;/a&gt;&lt;/div&gt; &lt;div class="pricext"&gt; &lt;table class="subtable" width="600" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td colspan="5"&gt;Anantara Bophut Resort and Spa - Anantara Suite - #2013-08-07#&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Total&lt;/td&gt; &lt;td&gt;STD Rate&lt;/td&gt; &lt;td&gt;STD Supps&lt;/td&gt; &lt;td&gt;SNG&lt;/td&gt; &lt;td&gt;Extra&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="" class="price_normal"&gt;0&lt;/a&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;0&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="5"&gt;&lt;table width="100%" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td nowrap="nowrap"&gt;Age 35 (1)&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (1) Supps&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (2)&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (2) Supps&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="5"&gt;2 2 2# Age 35 2 # EBO I(-15.00%PP) = -0&lt;br&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;StdOcc: 2&lt;/td&gt; &lt;td&gt;AdultBasis: PR&lt;/td&gt; &lt;td&gt;AdultAgeFrom: 12&lt;/td&gt; &lt;td colspan="2"&gt;RoomBoardCode: BB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;RoomID: 5173&lt;/td&gt; &lt;td&gt;ContractID: 511&lt;/td&gt; &lt;td colspan="2"&gt;Total: &lt;span class="grandtotal"&gt;0&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;div class="containerprice"&gt; &lt;div class="pricedate"&gt;&lt;a href="" class="price_normal"&gt;0&lt;/a&gt;&lt;/div&gt; &lt;div class="pricext"&gt; &lt;table class="subtable" width="600" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td colspan="5"&gt;Anantara Bophut Resort and Spa - Anantara Suite - #2013-08-08#&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Total&lt;/td&gt; &lt;td&gt;STD Rate&lt;/td&gt; &lt;td&gt;STD Supps&lt;/td&gt; &lt;td&gt;SNG&lt;/td&gt; &lt;td&gt;Extra&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="" class="price_normal"&gt;0&lt;/a&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;0&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="5"&gt;&lt;table width="100%" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td nowrap="nowrap"&gt;Age 35 (1)&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (1) Supps&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (2)&lt;/td&gt; &lt;td nowrap="nowrap"&gt;Age 35 (2) Supps&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;td nowrap="nowrap"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="5"&gt;2 2 2# Age 35 2 # EBO I(-15.00%PP) = -0&lt;br&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;StdOcc: 2&lt;/td&gt; &lt;td&gt;AdultBasis: PR&lt;/td&gt; &lt;td&gt;AdultAgeFrom: 12&lt;/td&gt; &lt;td colspan="2"&gt;RoomBoardCode: BB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;RoomID: 5173&lt;/td&gt; &lt;td&gt;ContractID: 511&lt;/td&gt; &lt;td colspan="2"&gt;Total: &lt;span class="grandtotal"&gt;0&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt;&lt;/td&gt; &lt;/tr&gt; </code></pre> <p>This is the datepicker init ondomload</p> <pre><code>$(function() { $.ajaxSetup({ cache: false }); $("#quote").submit(function(e){ e.preventDefault(); }); $( "#datefrom" ).datepicker({ dateFormat: "dd-mm-yy", changeMonth: false, numberOfMonths: 1, minDate: 0, onSelect: function(dateText, inst) { var aDates=dateText.split("-"); var strSelectedDate=aDates[1]+'/'+aDates[0]+'/'+aDates[2]; var oSelectDate=new Date(strSelectedDate); //$( "#dateto" ).datepicker( "option", "minDate", $("#datefrom").val() ); oSelectDate.setDate(oSelectDate.getDate()+1); $("#dateto").val(Convert(oSelectDate.getDate())+'-'+Convert(parseInt(oSelectDate.getMonth())+1)+'-'+oSelectDate.getFullYear()); $( "#drNoOfNights" ).val(1); } }); $( "#dateto" ).datepicker({ dateFormat: "dd-mm-yy", changeMonth: false, numberOfMonths: 1, onSelect: function(dateText, inst) { var aDates=$( "#datefrom" ).val().split("-"); var strSelectedDate=aDates[1]+'/'+aDates[0]+'/'+aDates[2]; var start=new Date(strSelectedDate); aDates=dateText.split("-"); var strSelectedDate=aDates[1]+'/'+aDates[0]+'/'+aDates[2]; var end=new Date(strSelectedDate); var diff = 0; if (start &amp;&amp; end) { diff = Math.floor((end.getTime() - start.getTime()) / 86400000); // ms per day } $('#drNoOfNights').val(diff); } }); }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload