Jaxel
Well-known member
Okay, so I have on my portal, a TopCtrl button called "Promote Thread".
When you click on the TopCtrl, it brings up an OverlayTrigger...
When you submit the promote thread overlay trigger, it runs through and sends the data back via AJAX to prevent page reload. This is a problem with this however... in addition to the word "Promote Thread" on the TopCtrl, there is also a <span> tag.
Using AJAX, I can easily replace "Promote Thread" with "Promote Options", but I can't replace the <span> tags; they get lost in the transition. If I force the <span> insert in the controller, the javascript just changes < and > to < and >.
Is there any way to fix this?
When you click on the TopCtrl, it brings up an OverlayTrigger...
When you submit the promote thread overlay trigger, it runs through and sends the data back via AJAX to prevent page reload. This is a problem with this however... in addition to the word "Promote Thread" on the TopCtrl, there is also a <span> tag.
Using AJAX, I can easily replace "Promote Thread" with "Promote Options", but I can't replace the <span> tags; they get lost in the transition. If I force the <span> insert in the controller, the javascript just changes < and > to < and >.
Code:
return $this->responseRedirect(
XenForo_ControllerResponse_Redirect::SUCCESS,
XenForo_Link::buildPublicLink('threads', $thread),
null,
array('linkPhrase' => '<span>'.new XenForo_Phrase('promote_options').'</span>')
);
Is there any way to fix this?