When I install my drupal site, everything is Ok, but some days later, when I want to create a new block whick body has some javascript codes, I am failed, when I click the save block button, nothing is happen.

but if I create a new block which body has no javascript codes, I am success.

I have spend some time to find the reason, but I still can't resolve it,

Please give me a help, very thanks!

Comments

hectorplus’s picture

In the input format, select PHP code, full html or the default filter will not work.

cgs’s picture

I have tried the three input format respectively, Filtered HTML, PHP code, Full HTML, and still failed, I am feel very strange, when I installed drupal everythig is Ok, but some days later, appear this problem.

mooffie’s picture

when I click the save block button, nothing is happen

You may have hit this problem:
http://drupal.org/node/110219

In other words, you may have some Apache mechanism installed that sees the "javascript" tag you've typed, thinks it's a security risk, and stops you.

Here's a related discussion:
http://drupal.org/node/218731

cgs’s picture

Very thanks,mooffie,I have resolved this problem,The cause of the problem is that the < / script >, Drupal (or one of the modules) can't get past this, I tried this, success.

<?php
   print "<scr";
   print "ipt>";
?>
   // my javascript here

<?php
   print "</scr";
   print "ipt>";
?>