i would like to update follow div with ajax request written in javascript method.
asp.mvc view:
<div id="feed" onload="GetFeeds()">
<span id="feeds" runat="server">
<%= Model.Feeds %>
</span>
</div>
what schould i do in javasript?:
<script type="text/javascript">
// some AJAX Request with 'feed' Update, but HOW??
document.getElementById('feed');
function GetFeeds() {
// need to call method from HomeModel.cs GetAllFeeds()??
// or i should to write hole methode here?
}
</script>
it schould work without any controller action. method for FeedUpdating is written in HomeModel.cs / GetAllFeeds() and it works. I need just call it from javascript