Object doesn't support property or method call in consuming JSON object From ASP.NET MVC In Internet Explorer
Recently,
I've followed a simple tutorial regarding consuming JSON object in ASP.NET MVC. The error stated from the title of this post appears in IE9. The original snippet is this:
The solution is to enclose $.getJSON() in a function() statement based from the modified code below. The popup script just went away.
Cheers!
I've followed a simple tutorial regarding consuming JSON object in ASP.NET MVC. The error stated from the title of this post appears in IE9. The original snippet is this:
$(document).ready( $.getJSON( 'http://localhost:6222/home/customerjson', function (item) { $('#result') //show product name in .html('<p>' + item.CurrentCustomer.CustomerName + '</p>'); } ) );
$(document).ready(function(){ $.getJSON( 'http://localhost:6222/home/customerjson', function (item) { $('#result') //show product name in .html('<p>' + item.CurrentCustomer.CustomerName + '</p>'); } ) });
Comments
Post a Comment