Click here to Skip to main content
15,891,846 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to refresh only a particular div with out refreshing whole page.The div i want to refresh has a partial page as its rendered content.I want to refresh or reload that particular div only.Any suggestions.....
Posted
Comments
Mohibur Rashid 16-Aug-13 3:19am    
learn basics of javascript.
Jitendra Sabat 16-Aug-13 9:40am    
Thank you for your valuable suggestion.

There are many ways you can implement this. One can be use of jQuery .load() method :
JavaScript
$('#targetDiv').load('/newsfeed/updates.html');

And you can include timestamp in the request to avoid caching in some browsers.
JavaScript
var timestamp = new Date().getTime();
$('#targetDiv').load('/newsfeed/updates.html?t='+timestamp.toString());

For more details about its usage please refer:
http://api.jquery.com/load/[^]

Hope this would help
Thanks
 
Share this answer
 
I have gone for JQuery load() function,but it does not meet my requirement.I simply make my observable array empty;so that it regains it's original state as was in page load.This is a simple solution for this type of requirement.
 
Share this answer
 

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