Ajax Form submission inside CJuiTabs

I have view having form, with submitAjaxButton.

I have CJuiTabs on another view, loading above view using ajax in one of the tabs.

submitAjaxButton related code is not getting rendered. Form inside the tab is not submitted(ajax submission).

If I put the form on the same view leaving elements of forms behind, it works!

I observed,




jQuery('#yt0').click(function(){jQuery.ajax({'beforeSend':function(){

                            $("#ajaxUpdate").addClass("loading");

                          },'complete':function(){

                            $("#ajaxUpdate").removeClass("loading");

                          },'type':'POST','url':'/index.php/controller/ajaxAction','cache':false,'data':jQuery(this).parents("form").serialize(),'success':function(html){jQuery("#ajaxUpdate").html(html)}});return false;});

});

this code is not rendered in my case!

As I am using renderPartial for rendering this view (form) I am missing out jquery. - my guess

How to register jquery there?

Any help?

In case anyone else lands on this post and looking for a similar answer:

When rendering a partial that has widgets on it, you should tell the renderPartial() method that it should process the returned content, i.e.:




public function actionTest()

{

    $this->renderPartial('_widgetPartial', // partial containing a cjuiwidget

        $dataArray, // the data you want to send through to partial

        false, // whether to return the partial's content or echo it, false = echo, true = return

        true); // this parameter tells the renderPartial method to process the partial's client-side stuff afaik

}



Superb! Thank you!