In the past major social networking communities allowed users to add JavaScript to their blog posts and profiles not realizing that a major security risk was being created. After ending up offline because of these breaks in security sites like Wordpress.com stopped allowing the use of JavaScript on their pages. This has caused a bit of frustration for those who host their blogs for free on the Wordpress site, and for those who use the Wordpress platform on their own server.
While hosting Wordpress on ones own server allows for a lot more flexibility the software's' built in security features still make using JavaScript difficult. Inserting JavaScript directly into a templates sidebar coding can sometimes cause layout problems and errors. Recent upgrades in the Wordpress 2.0 series now allow users using dynamic sidebars to add JavaScript code into text box widgets. This feature makes it possible to add Google Adsense, MyBlogLog, and other JavaScript codes into the sidebars but doesn't help when it comes to adding JavaScript directly into an individual Wordpress post.
Luckily several designers who use Wordpress have developed plugins to help get around this limitation. After trying several with varying results the plugin currently used at my Wordpess powered site, RandomWoman.com is the Inline JavaScript Plugin developed by Volcano at Ooso.net. (site is multi-lingual). The plugin consists of one php file, inline-js.php, which is copied into the wp-contents/plugin directory. After the plugin is placed into the directory and activated it is now possible to insert working JavaScript directly into a post using the following code (after removing excess spacing):
[inline]
< script type= " text/ javascript " >
< the JavaScript you want to insert >
[/inline]
If you would like to add any text after your JavaScript enter a line break code < br > followed by your text. The following is an example:
[inline]
< script type= "text/ javascript ">
< the JavaScript you want to insert >
[/inline]
< br >
The Text You Want To Enter
This code was used in Wordpress version 2.3.2 with the Visual Editor turned off. The editor can be turned on and off by accessing the User Profile in the "Options" folder of the Wordpress dashboard.
Published by T. McSpadden
Tameka McSpadden is a freelance writer currently residing in North Georgia. With both a Bachelor of Science in healthcare management and an associate degree in business administration, T. McSpadden enjoys w... View profile
National Post-Katrina College Summit Takes Place This WeekStudents and faculty from 33 colleges, including three CSU campuses, UC Berkeley and Stanford University, asked college campuses to take part in the "National Post-Katrina Colle...- Mastering Joomla: How to Import Wordpress into Your Joomla WebsiteBy incorporating WordPress into your Joomla website, you will be able to access all of your blogs through Joomla. This tutorial will walk you through two methods by which you can import Wordpress into your Joomla webs...
- Wordpress Web Hosting Guides and Coupon CodesIf you are currently running a Blogger blog, or just simply writing for other websites, it is probably about time you thought about running your own WordPress Blog. Here's a guide to a quick, one click installation of...
- Blogging Platforms: WordPress vs Movable TypeThere are several blogging platforms out there, and two of the dueling platforms appear to be WordPress and Movable Type. A look at how they compare.
- How to Build a Powerful Website Using WordPress
- The Top Five Essential WordPress Plugins
- Wordpress Themes You (Probably!) Haven't Seen Before
- Wordpress Adsense System for Blogging for Profits. A Review and Does it Work?
- How to Add "Digg It!" Button to Your WordPress Blog Posts
- How to Install Plugins in WordPress
- Installing WordPress Through Your C-Panel




8 Comments
Post a CommentDoesn't work. All it did was make my page take 3 minutes to load and the javascript was still stripped out.
http://mama-tour.blogspot.com/
Thanks for the post
Hello.
Guide
Attractions
Tour Pattaya, Pattaya Nightlife
Pattaya+Nightlife
Bar, beer, entertainment disco, lady boys show cabaret pubs and live music outdoors at the famous Walking Street is known Nightlife.
help.. what cant i use this plugin correctly..
im using wordpress 3.0..
according to http://wordpress.org/extend/plugins/inline-javascript/installation/
i hav to Disable tag balancing ‘WordPress should correct invalidly nested XHTML automatically’ through the ‘Options / Write’ menu in WordPress..
but i cant find the 'option / write'
please anybody would assist me to hav it works on my wordpress 3.0
thx b4
Thanks for pointing out to the right plugin.
It just plain works.
I had troubles with '&' sign inside the URLs in JS - WP converted it to , whatever I did.
That plugin and [inline] [/inline] solved that
Unfortuantely, I messed with the plug in and no joy on my end. Thanks for the post though.
I'm going to give it a try. I've got a lottery site and have to use iFrame on the page to pull in the lottery results script, which is ok I guess....... until I start to write text below the iFrame script and the iFrame disappears. I wonder why? This is hurting my SEO with Google because I have no content on the page.
http://www.myarkansaslotterynumbers.com
Thanks for this post, It help me a lot.
This is an EXCELLENT plugin.