XF 2.2 Notice with JavaScript

smozgur

Active member
We can use XF.overlayMessage() and XF.alert() functions, and it is beautiful.

Is there a way to create and/or trigger a notice with JavaScript like these functions?

I am trying to show a floating notice when something certain happens at the client side. It is possible to do what I need by appending notice elements in the DOM by using JavaScript when it is necessary, but I am looking for an internal way, if there is any.

Thanks.
 
No such thing exists.

So you'd need to either add the notice elements to the DOM and control when they're shown with JS, or create the elements on demand and insert them into the DOM when needed.
 
No such thing exists.

So you'd need to either add the notice elements to the DOM and control when they're shown with JS, or create the elements on demand and insert them into the DOM when needed.

Thank you for the answer, @Chris D.

Yes, I already coded like this, but I was just hoping something like that. The XenForo framework amazes me every single day, so I couldn't stop myself asking the question as it would be cool to have something like that in the core framework. :)
 
Top Bottom