After a review, I finally found a solution that I was quite satisfied with. I will share it with you in my blog.
The first step is to provide an area on the signature page to display the Form Content, where the DIV is used.
Copy codeThe Code is as follows:
<Script type = "text/javascript">
$ (Document). ready (function (){
LoadPage ("doc_view", "<? Php echo $ this-> doc_view_url. '/flag/1';?> ");
});
</Script>
<? Php
$ P = new Portlet ();
$ P-> setCaption ("Document View ")
-> SetShowBorder (false)
-> AddItem ("<div id = 'doc _ view'> </div>") // 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 JavaScript code to obtain the form page, using jQuery
Copy codeThe Code is as follows:
// Dynamically load the page
// Id Display the container component ID on the page
// Url
Function loadPage (id, url ){
$ ("#" + Id). addClass ("loader ");
$ ("#" + Id). append ("Loading ......");
$. Ajax ({
Type: "get ",
Url: url,
Cache: false,
Error: function () {alert ('Load page' + url + 'error! ');},
Success: function (msg ){
$ ("#" + Id). empty (). append (msg );
$ ("#" + Id). removeClass ("loader ");
}
});
}