After many attempts, I finally found a solution that I am quite satisfied with, and now I am writing it in my blog to share with you.
The first step is to provide an area in the sign-off page to display the form content. DIV is used here.
$p = new Portlet();
$p->setCaption("Document View")
- >setShowBorder(false)
->addItem("
") //This Div is the container used to display the form content
-> render();
echo $this->partial("approval/CommentsList.phtml", array("approval_list" => $this->approval_list));
?>
The second step is to write a piece of JavaScript to get the form page, using jQuery
//Dynamic loading page
//id Container component ID of the displayed page
//url URL of the page to be loaded
function loadPage(id, url) {
$ ("#" id).addClass("loader");
$("#" id).append("Loading...");
$.ajax({
type : "get",
url: url,
cache: false,
error: function() {alert('Error loading page 'url '!');},
success: function (msg) {
$("#" id).empty().append(msg);
$("#" id).removeClass("loader");
}
} );
}