Having issues with TopCtrl and OverlayTrigger AJAX...


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 &lt; and &gt;.

return $this->responseRedirect(
    XenForo_Link::buildPublicLink('threads', $thread),
    array('linkPhrase' => '<span>'.new XenForo_Phrase('promote_options').'</span>')
Is there any way to fix this?
I suppose that if you put the span tags inside the phrase, you will get the same result?
I meen
array('linkPhrase' => new XenForo_Phrase('promote_options'))
(where phrase promote_options contains the span...)

Just a thought.. probably wont work.

But i vaguely remember having a similar problem long long time ago.
the solution was per javascript.
putting the phrase into a variable in the final template.. and doing the replacement with javascript in the response part.