1

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.

EDIT 1:

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

  • 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
1

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.

  • 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
  • 1
    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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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