Title: Javascript issues
Last modified: August 21, 2016

---

# Javascript issues

 *  Resolved [Vidyut](https://wordpress.org/support/users/vidyut/)
 * (@vidyut)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/javascript-issues-3/)
 * I was getting javascript issues with this plugin, which were inexplicable, till
   another plugin’s tests (Geo Mashup) showed the following error.
 *     ```
       Uncaught TypeError: Cannot read property 'value' of null
       Source:
       http://aamjanata.com/wp-content/plugins/zia3-css-js/syntax_highlighter/lib/codemirror.js?ver=3.6:3507
       ```
   
 * I am no expert, but thought I’d post this here in case it helps.
 * [http://wordpress.org/plugins/zia3-css-js/](http://wordpress.org/plugins/zia3-css-js/)

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

 *  Plugin Author [Serkan Azmi](https://wordpress.org/support/users/zia3wp/)
 * (@zia3wp)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/javascript-issues-3/#post-4096953)
 * Hi Vidyut,
 * You may have other plugins using the same syntax highlighter that have been uninitialized
   properly.
 * Please send me a list of installed plugins to see if I can replicate the issue.
   So far there has been no issues with other plugins.
 * Cheers
 *  [J.D. Grimes](https://wordpress.org/support/users/jdgrimes/)
 * (@jdgrimes)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/javascript-issues-3/#post-4096974)
 * I have also experienced this error with the plugin running on one of my clients
   sites. The error is caused by the JS for this plugin being loaded on every single
   page in the administration panels. This plugin’s JS is trying to initialize the
   syntax highlighting for the two textboxes, but the textboxes are only on the 
   edit/add post screens, and so on the other screens it gives this error.
 * Serkan, you should stop hooking the enqueue functions from the actions that you
   have them hooked to, and only call them inside of the function that displays 
   the metaboxes. That way the JS will only be loaded on the administration panels
   where it is actually needed. I edited the plugin to do this, and the error was
   fixed. And the plugin still worked on the add/edit post screens.
 *  Plugin Author [Serkan Azmi](https://wordpress.org/support/users/zia3wp/)
 * (@zia3wp)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/javascript-issues-3/#post-4096977)
 * Thanks for the find, I updated the plugin to only load the required scripts when
   metaboxes are visible as suggested by J.D. Grimes. Please let me know if this
   fixed your problem Vidyut.
 * Cheers

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

The topic ‘Javascript issues’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/zia3-css-js_5badfd.svg)
 * [Zia3 CSS JS](https://wordpress.org/plugins/zia3-css-js/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/zia3-css-js/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/zia3-css-js/)
 * [Active Topics](https://wordpress.org/support/plugin/zia3-css-js/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/zia3-css-js/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/zia3-css-js/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Serkan Azmi](https://wordpress.org/support/users/zia3wp/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/javascript-issues-3/#post-4096977)
 * Status: resolved