I tried to add a javascript in a post in my blog which is a wordpress hosted blog. However, the software does not allow javascript to be added .However, when i added the script in the widgets ,it accepted the same. Why is this so? Can the javascripts not be added in the posts?
Wordpress.org blog doesn't accept javascript in post
(11 posts) (5 voices)-
Posted 9 months ago #
-
You mean your blog is on wordpress.com? If so then it can be that javascripts are filtered out from posts because of security issues. But make sure you tried to paste javascript while in HTML code view.
Posted 9 months ago # -
No. As i mentioned it is a hosted blog which uses wordpress.org software.I am aware that in wordpress.com blogs you are not allowed javascripts.
When I am trying to make a post and add javascript in the post, the same gets removed. But when the same script is added in widgets, it doesn't get removed. What is the reason and can it be rectified?Posted 9 months ago # -
anyone??
this question i have asked since i was trying to add a script in my post so that the script runs only when the post is opened. the script works in the widget box but that means that the script will run whenever any page on site is opened..Posted 9 months ago # -
You can use the Inline Javascript plugin as detailed here.
There's a method described in the WordPress codex too. Have a look at the Javascript in posts section for more details.
Posted 9 months ago # -
hi sparx,
thanks again. do you think there is any risk in adding script to a post?Posted 9 months ago # -
@techlee: depends on the script...
Plus, what kind of functionality are you trying to implement anyway? Finally, can you elaborate on what you mean exactly by "risk"? security-wise or earnings-wise?
Posted 9 months ago # -
Risk - I mean security wise.
I am just trying to find and add a script to provide some mouseover effects on the text.Posted 9 months ago # -
Instead of using Javascript, try getting the functionality via CSS. Then there's no question of script based injection ever taking place.
Posted 9 months ago # -
Thanks Sparx.
But as I mentioned I need to find a way to add javascript in the posts. I need to create a post where I can provide the link to my firefox searchbar .I tried using the Inline plugin , but it does'nt add to my current site (wordpress 2.7)Posted 8 months ago # -
Well, I think you'd best get in touch with the plugin's author and work things out with him/her. I think you'll agree that the plugin was designed for the exact behaviour that you require, wouldn't you? If something's interfering with its working, your best bet would be to seek help from the source.
Any particular errors / messages?
Posted 8 months ago # -
Hi Frnds
smsfloor.blogspot.com
apni-videos.blogspot.comLove Sms , Holi Sms , Friendship Sms , Funny Sms, Sardar Sms & Many More.....
Posted 8 months ago # -
ORANGE FINANCIALS
If you are looking for accurate and best SHARE TIPS, you are at the right place. Our performance is simply the best and most accurate, showing both the profit and the losses in STOCK TIPS & NIFTY TIPS.We follow
Research on undervalued securities
Best management practices
Check On strong financials
Highly Customer Centric
Believes in customer profitability
"With us you don't buy stocks, you buy prospering businesses"- Saket Jalan
Posted 7 months ago #
Reply
You must log in to post.