Yii Framework Forum: Problem With Ajax Submit-Button - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Problem With Ajax Submit-Button ... Rate Topic: -----

#1 User is offline   eggshOt 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 32
  • Joined: 18-September 12
  • Location:Philippines

Posted 07 October 2012 - 09:43 PM

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.

#2 User is offline   seenivasan 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 620
  • Joined: 17-June 12
  • Location:Chennai,TamilNadu,India.

Posted 08 October 2012 - 05:50 AM

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.

2.Attach unique name to both submit button.
echo CHtml::ajaxSubmitButton('submit','',array(


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

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

Share this topic:

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users