Problem With Ajax Submit-Button

I have this ajax button in my _table view.

This _table view is rendered partially through AJAX form submission in my main view.

The problem is when I click submit (the button in the _table view) the submitted data are the ones

being serialized in my main view or in other word the ajax button in my main view takes the action

instead of the other one.

Dear Friend

I hope the following may be helpful.

1.Make sure that renderPartial was called properly.It should be postprocessed to attach the script.




$this->renderPartial('subForm',array(),false,true);



2.Attach unique name to both submit button.




echo CHtml::ajaxSubmitButton('submit','',array(

'update'=>"#test",

),array('name'=>'first'));



and




echo CHtml::ajaxSubmitButton('submit',array('test/subAjax'),array(

'update'=>'#retest'

),array('name'=>'second'));



This way, it ensures that both the submit button have unique id.