Title: JS CodeBlock not Saving
Last modified: August 21, 2016

---

# JS CodeBlock not Saving

 *  Resolved [Sean Manion](https://wordpress.org/support/users/seanmanion/)
 * (@seanmanion)
 * [12 years ago](https://wordpress.org/support/topic/js-codeblock-not-saving/)
 * **Issue**
    I am trying to save a JS code block, but it will not save. The save‘
   loading image’ will spin for a long time, then the save ‘diskette’ image will
   flash to indicate saving needs done.
 * **Confusion**
    1- I am able to save CSS code blocks just fine. 2- This worked
   perfectly on a demo site.

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [wipeoutmedia](https://wordpress.org/support/users/wipeoutmedia/)
 * (@wipeoutmedia)
 * [12 years ago](https://wordpress.org/support/topic/js-codeblock-not-saving/#post-4906822)
 * Thanks for your message.
    It may be a configuration issue, not sure at this stage.
   We are currently looking into this.
 * Kind Regards,
    Damian
 *  Thread Starter [Sean Manion](https://wordpress.org/support/users/seanmanion/)
 * (@seanmanion)
 * [12 years ago](https://wordpress.org/support/topic/js-codeblock-not-saving/#post-4906825)
 * Thanks for the rapid response Damian! Here’s an update:
 * If I do Not include <script> in the code block, then save will occur, but will
   not take effect on the page.
 * If I do include <script> in the code block, then save will not occur and will
   not take effect on the page.
 * Here is what I’m trying to add into a JS code block:
 * <script src=”[http://code.jquery.com/jquery-latest.min.js”></script&gt](http://code.jquery.com/jquery-latest.min.js”></script&gt);
   
   <script type=”text/javascript”> function scaleDown() {
 *  $(‘.work > figure’).removeClass(‘current’).addClass(‘not-current’);
    $(‘nav 
   > ul > li’).removeClass(‘current-li’);
 * }
 * function show(category) {
 *  scaleDown();
 *  $(‘#’ + category).addClass(‘current-li’);
    $(‘.’ + category).removeClass(‘not-
   current’); $(‘.’ + category).addClass(‘current’);
 *  if (category == “all”) {
    $(‘nav > ul > li’).removeClass(‘current-li’); $(‘#
   all’).addClass(‘current-li’); $(‘.work > figure’).removeClass(‘current, not-current’);}
 * }
 * $(document).ready(function(){
 *  $(‘#all’).addClass(‘current-li’);
 *  $(“nav > ul > li”).click(function(){
    show(this.id); });
 * });
 * </script>
 *  Plugin Author [wipeoutmedia](https://wordpress.org/support/users/wipeoutmedia/)
 * (@wipeoutmedia)
 * [12 years ago](https://wordpress.org/support/topic/js-codeblock-not-saving/#post-4906831)
 * Thanks for the info.
    This is strange as the code you provided above is Saving
   for me. Please send me an email on: [support@css-javascript-toolbox.com](https://wordpress.org/support/topic/js-codeblock-not-saving/support@css-javascript-toolbox.com?output_format=md)
 * We are starting to wind down the support on the Free edition as we can no longer
   afford to keep working here, but this seems like a bug and needs to be addressed.
 * Thanks very much.
 * Kind Regards,
    Damian
 *  Plugin Author [wipeoutmedia](https://wordpress.org/support/users/wipeoutmedia/)
 * (@wipeoutmedia)
 * [12 years ago](https://wordpress.org/support/topic/js-codeblock-not-saving/#post-4906833)
 * If Save does not work on your code, then try checking for errors whilst Saving.
   A good chance there are 404 (Not Found) errors being thrown. In one of my other
   test sites this was a server issue due to mod_security rules blocking syntax 
   in one of my test scripts (textillate.js), which in this case was:
    [code]concat([/
   code]. You can contact your server if you feel the mod_security policies are 
   too strict, and request that they turn it off. That said, a much better option
   instead of reducing your security policies just so you can run a script via a
   code block (code file or code template, etc) is to let CJT call the hosted (your
   host or via CDN) script externally such as: [code]<script src="http://ajax.googleapis.
   com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>[/code]
 * I can’t imagine it to be the <script> tag alone that is stopping code block saving,
   but you know we can’t fully rule that out in your case. It would be very interesting
   to know what is causing this.
 * Keep me posted.
 * Kind Regards,
    Damian
 *  Plugin Author [wipeoutmedia](https://wordpress.org/support/users/wipeoutmedia/)
 * (@wipeoutmedia)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/js-codeblock-not-saving/#post-4906946)
 * Hi seanmanion,
 * Did you manage to get this issue resolved?
 * Kind Regards,
    Damian
 *  Thread Starter [Sean Manion](https://wordpress.org/support/users/seanmanion/)
 * (@seanmanion)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/js-codeblock-not-saving/#post-4906947)
 * Ah.. I think there was something buggy in my server and couldn’t use this. Not
   an issue with the plugin. We can close this ticket at any time. Thanks for the
   check up!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘JS CodeBlock not Saving’ is closed to new replies.

 * ![](https://ps.w.org/css-javascript-toolbox/assets/icon-256x256.gif?rev=3132209)
 * [CSS & JavaScript Toolbox](https://wordpress.org/plugins/css-javascript-toolbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/css-javascript-toolbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/css-javascript-toolbox/)
 * [Active Topics](https://wordpress.org/support/plugin/css-javascript-toolbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/css-javascript-toolbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/css-javascript-toolbox/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Sean Manion](https://wordpress.org/support/users/seanmanion/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/js-codeblock-not-saving/#post-4906947)
 * Status: resolved