Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to insert a JavaScript code in block body but I cannot save it, after 2 or 3 minutes it stop (shows a message The connection has timed out). I want to add statcounter code to a block.


I can add JavaScript in local-host but I can't do in server (Linux server, VPS cPanel)

share|improve this question
What text-format options are set for the block? – Volker Jul 1 '12 at 10:58
Input format is Full HTML. – Ashok KS Jul 1 '12 at 11:03
Have you tried the module for statcounter? drupal.org/project/statcounter – Volker Jul 1 '12 at 11:13
Yes I am using that module, but the same problem exist !!!! – Ashok KS Jul 1 '12 at 11:16
Sounds like it's a server configuration issue. Can you insert a simple javascript test without having it error out? Something like: (function(){ console.log('Hello World!'); })(); – marblegravy Jul 2 '12 at 6:43

Create your own text filter which just does nothing which means it allows really "all" input without any filtering.

Please make sure that you allow only trusted people to use this filter since it would be easy to add XSS code.

share|improve this answer
Thanks for your help, I tried your method but unfortunately the same error occurs!. What to do ? – Ashok KS Jul 2 '12 at 6:24
Are you using a WYSIWYG editor? Sometimes they strip out script tags even if the filter allows them. – Drupac Jul 2 '12 at 14:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.