Passing Data To Cjuidialog

I am trying to pass a data variable into a text control of the dialogbox. I am using the data function of the dialog to pass the variable in via the onclick event. How do I get the variable back out to the textedit box of the dialog so it is displayed at startup??


echo CHtml::button('Edit Category', array('onclick'=>'{$("#dialogModifyCategory").data("category",$("#id_category").val()).dialog("open");}','class'=>'assetControl3'));


     $this->beginWidget('zii.widgets.jui.CJuiDialog', array( // the dialog



            'title'=>'Modify Category',





            'buttons'=>array('Submit'=>'js: function() {

                editdata = {edit_category: $("#edit_category").val(), id_category: $("#id_category").val()};



                    url: "/TekEnterpriseServer/index.php?r=asset/modifycategory", 

                    data: editdata,

                    success: function() {}





                'Cancel'=>'js: function() {$(this).dialog("close");}'),





    <div class="form" id="modify_category"


      echo "<a class='assetLabel2' style='left: 25px'>Edit Category</a>";

      echo '</br>';

      echo CHtml::textField('edit_category','', array('class'=>'assetEntry', 'style'=>'left: 25px'));