The simplest thing to do is use the jQuery .load()
function.
$('#targetDivId').load('${your.struts.url}', function() {
// stuff to do when the div has been reloaded
});
Now understand that you should make sure that the response from your action is a page that's not really a complete HTML page, because you can't stuff a complete HTML document inside a <div>
. If you have a complete document, and you only want a portion of it (say, a block contained within a <div>
with id "usefullStuff"), you can do this:
$('#targetDivId').load('${your.struts.url} #usefullStuff', function() {
// code
});