Oct 7, 2006

I recived a e-mail asking me if posting javascript in blogposts is actually After Amit Agarwal and other people blogged about it recently.

The answer is a overcomplicated Yes/No.

Yes, becuase there is nothing actually wrong with posting JS code into a post, it will work out ok.

No, because the problem is not running code in a post the problem comes when they are all running at once in the main, it will screw up the blog 90% of the times unless you:

A)You really really know what are you doing.
B)The code is of a very simple variety.
C)You got a main page with less than 5 posts in it.

So, that is the reason this warning is on your Blog post editor when you try to do it:

It will also show up with unclosed HTML, or any really malformed code,and this are the kind of warnings that you really must pay atention to.

So,in my opinion:

Don´t post trivial JS code in posts that later you have to remove post by post.

Do it when you are sure it is worth it and safe to do so.


Amit Agarwal said...

Such a coincidence that I also wrote a similar post this week and the graphic has exactly the same look-n-feel as your screenshot :)

Avatar said...

the generic reference was there, but i didn´t knew you read me. but i have added a nudge to you ok. ;)

S i m o n a G a b r i e l a said...

U are very kind to offer us all this informations !

Post a Comment

Welcome To Bloggeratto. In here you can post any kind of comment you want. Seriously, Go ahead.

Lijit Ad Wijit


Blog Archive


Web Statistics