Rendering a gsp page after an ajax success
<p>I want to render a gsp page inside a fancybox after the ajax call has returned a success.</p>

<p>I have done the following :</p>

<pre><code>   function editCompanyProfile(companyProfileId){
   $.ajax({
       url: '${createLink(controller: 'benefitContract',action: 'editCompanyProfile')}',
       type: 'POST',
       data: {id:companyProfileId},
       success: function (data) {
           $.fancybox({
            /* I need to render a gsp here */
           })
       }
   })
</code></pre>

<p>}</p>

<pre><code>     def editCompanyProfile(){
          def isroleAdministrator=false
    if (User.findById(session.userId).allAuthorities?.contains('ROLE_ADMINISTRATOR')){
        isroleAdministrator=true;
    }
    render(template:"/benefitContract/companyProfile",model:[isroleAdministrator:isroleAdministrator,companyProfile:params.id])
}
</code></pre>

<p>Could anyone tell me how should i go about doing it?</p>