XF 2.3 A Tale of Ajax Woes: The Button That Perished Post-Edit

Robert9

Well-known member
Last night, the AI and I battled long and hard against an Ajax monster named Xenforo, and we were defeated.

What exactly happened?

Well, we desired to have a button, which one could click in the top right of a bbCode code container to obtain the code within the bbCode. This worked well enough, but woe betide us if one edited the post. Then the fun was over, for the button was now dead, stone dead, as the lads from the Flying Circus were wont to say.

I should have been lying beside my once rescued maiden for hours, but instead, here I sit, not understanding why an edit via Ajax should supposedly destroy the entire DOM, the very DOM that carries my button.

Therefore, ye gods of Xenforo's grace, tell me how I may maintain my button and its relationship to the copy function, since I need an edit via Ajax beforehand and do not wish to reload the page.
 
Back
Top Bottom