How To Allow Javascript And Custom HTML To Work On Joomla.
This article is based on Joomla 3.
You most likely have noticed that it does not work when you paste a custom html and javascript code as Source Code via the default Joomla Editor or into a Joomla Module/Extension like Custom HTML.
There are various ways to get this accomplished, and this is the quickest one I know of; plus many, if not most, do not want to spend time learning a new language format or installing a javascript addon which are what the other methods involve. Hopefully the below method is simple enough for all to be able to do as you long as you are able to navigate your Joomla control panel. Side note: Please do not get my mention of "Joomla control panel" mixed up with a hosting control panel, such as the cpanel that Web Hosting With $1 provides.
Please note that I do not get paid to write these articles.
By the way, previous versions involved disabling the Joomla filtering and that allowed javascripts to be added via the editor. That is an obsolete method, unless you need it for the previous version and if so, post a question for it in the Comments below and I'll get back to you if I am available.
Steps
- Login to your Joomla back-end control panel.
- Go to Users >> Manage.
- Select the user you want to be able to add javascript/custom html; typically this is the Super User selection.
- Select the Basic Settings tab.
- Change Editor selection to "Editor - None", and click on Save & Close button.
You are done.
Now if you go and edit your module, such as a Custom HTML module/extension, or just use the editor for an article, you will only see an entry box, and you simply paste your html and javascript code into it, and if the code is correct, it should work on the site after you save your changes. Very useful if you are adding banners or interactive features to your site as displays or buttons. For example, when adding the free live business chat button, from Business Chat Services, for tracking and interaction with your website visitors for Sales and Support.
Changes After Adding Your Javascript/Custom HTML.
After you have made the edits you want via your editor, then you will most likely want to go back and change the Editor to be TinyMCE so you have all the editing features for creating articles without manual creation of HTML code.
Consider Contributing
- Article Contribution:
Consider submitting an article of your own to Tech Notes. I will create a sub-category for your article if needed. Guest articles are welcome! - Financial Contribution:
If you found this article or any Tech Notes article useful, and you'd like to make a financial contribution as a simple thanks (no fear, any amount can be given; even just one dollar), you can use the Paypal contribution button which is safe and does not require you to have a Paypal account to make a contribution to Tech Notes.
Feel Free To Leave A Good Comment. :)
Look around this site and it's menus, and you may find other useful articles.