I have a page in which I render the entire page complete (including the ActiveForm) and after the page is loaded, I remove the form $(jquery).remove("ddd") and
then use ajax to load the form again (with new values from model) when a user clicks a button. The problem is once I refresh the form like this I loose my event attachments generated originally from ActiveForm that was loaded the first go around.
- I did it this way so that all scripts would be preloaded and in theory if I replaced the form the events would be attached (which they are not). Was hoping they were jquery delegates…
At the bottom of the page in the script section is automatically generated call
If I were to call this above in my jquery function, everything works on my active form as it should. But that requires me to copy and paste that snippet and place it in my jquery loading function. If I change the form, that has to change as well.
Is there anyway to make this call again? What am I doing wrong on this page? How can I get my form to call that or create that snippet again?