Ajaxsubmitbutton and RenderPartial only works once

Hey guys,

I have an issue regarding ajaxsubmitbuttons and the renderpartial method.

So, I have a form, which uses an ajaxsubmitbutton to send the post request to the controller.

The controller takes that information, saves the appropriate model, and then creates another form by first creating a view object:




$responseView = $this->renderPartial ('../response/responseView', 

			   	array(

					....

				), true);



and then returning it to the success function of the ajaxsubmitbutton, where it is appropriately placed within the page.

However, when I try to utilize the ajaxsubmitbutton from the recently created form, this sequence cannot be repeated.

Instead, the url is redirected to the controller’s action which is linked to the ajaxsubmitbutton.

I’m guessing that when i make a new view from renderpartial, jquery/ajax is not properly being set up (if that makes sense).

Any help would be very much appreciated.

Welcome to the forum. The search field is located in the upper right corner ;).

There’s a lot of threads about this. I located this one for you.

/Tommy