asp.net mvc - JQUERY GET operation not working -
i'm having trouble following jquery script
$('#extra_data').append('<div id="tabs-' + (tab_length + 1) + '"></div>'); $.get(url, function(data) { $('#tabs-' + (tab_length + 1)).html(data); });
my trouble $.get(..) operation doesn't return results - although when using firebug shows ajax call expected.
any clues?
thanks.
controller
<httppost()> _ function getpartialview() actionresult if (request.isajaxrequest()) return view("pvtest") else return view() end if end function
i've filtered request if ajax. can pass object partial view.
jquery
<script type="text/javascript"> $(document).ready(function() { $.ajax({ type: 'post', url: 'home/getpartialview', data: {}, datatype: 'json', beforesend: function(xmlhttprequest) { }, complete: function(xmlhttprequest, textstatus) { $('#extra_data').append(xmlhttprequest.responsetext); } }); }); </script>
partial view (pvtest.ascx)
<%@ control language="vb" inherits="system.web.mvc.viewusercontrol" %> <div id="01"> hello world </div>
Comments
Post a Comment