How to add javascript to Joomla 2.5 articles

Joomla 2.5 has reached its end of life as for 12/31/2014. Please be advised this may be a security risk to your website. You can view more information about the end of life here.

When you’re writing an article in Joomla 2.5 and save the changes, there are various elements that Joomla will naturally remove from your content. For example, if you’ve added any javascript to your article, Joomla will remove your script tags. This is a security measure taken by Joomla, but when you really need to use javascript this does cause headaches for many users.

Just like javascript, Joomla removes iframes from code as well. In a previous article we showed you how to allow iframes in your html code, and allowing javascript code follows the same steps.

Question: How do I prevent Joomla from removing my javascript code?
Answer: Review our article on allowing iframes in your articles. Follow the steps in the article, but substitute <iframe> with <script>.
Share this Article