I facing a strange issue... I am creating tables dynamically using the data from ajax call.. The code works in Firefox / but fails for Chrome...
HTML Structure I Intend to create :
<title>Offers MADE<title>
<Table>
proposed offer table
</table>
<title>Offers Received<title>
<Table>
Received offer table
</table>
But instead this is the outcome I get on Chrome / it works on Firefox though ..
<title>Offers MADE<title>
<title>Offers Received<title>
<Table>
proposed offer table
</table>
<Table>
Received offer table
</table>
I believe it has to do something with the ajax call response timing; Cause if I place a break-points it always works out..
To make sure the ajax call sequencing is correct I am making the second AJAX call in success() function of first AJAX call.
$.ajax{
::
url : get_Proposed_Offers.php
::
success : function(data)
{
//I make sure that the Proposed Offer Table gets populated
//I populate the "div" tag with required HTML
populate_Proposed_OfferTable();
//Here's where I make another ajax call to populate
get_Received_OfferData();
}
}
function get_Received_OfferData()
{
$.ajax{
::
url : get_Received_Offers.php
::
success : function(data)
{
populate_Received_OfferTable();
}
}
}
Can anyone please point out what is it I am doing wrong here?
I know that instead of using same tag if I start populating the "proposed" and "received" offers in different tags this should resolve my issue. But I want to know why this approach wouldn't work.
populate_*functions and the initial html would be a good start.