Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1.0 MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Screen name:
Jeff Mcbride
Jeff Mcbride's Profile
1
Posts
6
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Ideas
Problems
Expanded view
List view
Private Message
Getting 'data' is undefined error in I.E.11
[11Replies]
28-Oct-2015 12:10 PM
Forum:
Using jQuery
I'm trying to load arrays from a .json doc and populate a table with this data. It works fine in Chrome and FireFox, but not in I.E. 11. When I debug in I.E. 11 I get the error 'data' is undefined for data.insuranceReport. Here's my code:
$.getJSON('json/insuranceData.json', function(data) {
$.each(data.insuranceReport, function(i, f) {
var divData = "<tr>" + "<td>" + "<a href='employees/index.html" + "?dataTablePath=" + f.dataFile + "&insuranceName=" + f.insuranceName + "'>" + f.insuranceName + "</a>" + "</td>" + "<td>" + f.employeeCost + "</td>" + "<td>" + f.employerCost + "</td>" + "<td>" + f.totalCost + "</td>" + "</tr>"
$(divData).appendTo("#dataTable tbody");
});
});
<table id="dataTable" class="display">
<thead>
<tr>
<th class="text-left"><b>Insurance Name</b></th>
<th class="text-left"><b>Employee Cost</b></th>
<th class="text-left"><b>Employer Cost</b></th>
<th class="text-left"><b>Total Cost</b></th>
</tr>
</thead>
<tfoot>
<tr>
<th class="text-left"><b>Insurance Name</b></th>
<th class="text-left"><b>Employee Cost</b></th>
<th class="text-left"><b>Employer Cost</b></th>
<th class="text-left"><b>Total Cost</b></th>
</tr>
</tfoot>
<tbody>
</tbody>
</table>
Any idea why this is happening?
«Prev
Next »
Moderate user : Jeff Mcbride
Forum