Title: Issue with jquery onkeyup function
Last modified: August 21, 2016

---

# Issue with jquery onkeyup function

 *  [anoopcr](https://wordpress.org/support/users/anoopcr/)
 * (@anoopcr)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/issue-with-jquery-onkeyup-function/)
 * I have below code in my one of the page. It will validate a textbox for hexadecimal
   values.
    I did this code testing on my local system \ jsfiddle and on php fiddle.
   its working fine there. and once I put this on my wordpress site it is not functioning.(
   Error message not working)
 * html:
 *     ```
       <div class="input-resp-hpux-vbus"><span><input  class="textbox" id="vbus-id" name="vbus-id" type="text" /></span></div>
       <div id="test"></div>
       <script type="text/javascript" src="http://sitename.com/wordpress/wp-content/themes/freshlife/includes/js/emcsaninfo-symcli.js"></script>
       ```
   
 * and jquery code:
 *     ```
       $(document).ready(function () {
           $('#vbus-id').keyup(function () {
               var text_value = document.getElementById("vbus-id").value;
   
               if (!text_value.match(/\b[0-9A-F]\b/gi)) {
                   document.getElementById("vbus-id").value = "";
                   //  document.getElementById("vbus-id").focus();
                   var message = "You have entered a invalid id.Vbus id ranges         from 0 to F in hexadecimal";
                   test.innerHTML = message;
               } else test.innerHTML = '';
           });
       });
       ```
   
 * I have included the above javascript code on emcsaninfo-symcli.js file. Any reason
   the script not working
 * a [PHP fiidle setup](http://phpfiddle.org/main/code/cwn-vdf) here for this code

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

 *  [Shellbot](https://wordpress.org/support/users/shellbot/)
 * (@shellbot)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/issue-with-jquery-onkeyup-function/#post-4211390)
 * Try replacing instances of `$` in your JS code with `jQuery`.
 *  Thread Starter [anoopcr](https://wordpress.org/support/users/anoopcr/)
 * (@anoopcr)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/issue-with-jquery-onkeyup-function/#post-4211435)
 * I have tried it..but has issue..

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

The topic ‘Issue with jquery onkeyup function’ is closed to new replies.

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [anoopcr](https://wordpress.org/support/users/anoopcr/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/issue-with-jquery-onkeyup-function/#post-4211435)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
