Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Grid is not working in Internet Explorer while its working fine in Firefox and Google ChromeI think there is some mistake some where in java script. only grid top row is displaying while second row is not appending Here is my code

JavaScript
function contractordetails(data)
{
for(var i=0;i<data.length;i++){
var contratortable = document.getElementById('contractordetail');
var cname = data[i].contractor;
var address = data[i].address;
}
$('#enlistmentData').html('');
if(data.length==1){
$('#enlistmentData').html('');
}else{
$('#enlistmentData').append('<table border="1" style="width:100%" id="enlistmentDatatable">Company NameAddress');
$.each(data,function(k,val){
$('#enlistmentData_table').append(''+val.contractor+''+val.address+'');
});
}
Posted
Updated 16-Feb-14 19:45pm
v2
Comments
Sergey Alexandrovich Kryukov 17-Feb-14 2:26am    
Not enough information. I'm not sure that difference between browsers can be manifested on the code you show; the problem can be somewhere else, in HTML or CSS...
Where are your closing table tags, row/columns tags? If you generate invalid HTML, browsers still try to vendor it, but in this case the results could be unpredictable...
—SA

1 solution

Please see my comment to the question.

Please do the following: after you render the HTML page, look at its row code using browser's "View page source" (or something like that).
I suspect you generate invalid HTML. If it is invalid, browsers still try to render it, but the results can be unpredictable. The W3 standards does not describe how invalid HTML should be rendered, so nothing will guarantee that different browsers do it in the same way.

—SA
 
Share this answer
 
Comments
Maciej Los 17-Feb-14 18:19pm    
+5
Sergey Alexandrovich Kryukov 17-Feb-14 18:32pm    
Thank you, Maciej.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900