Title: onchange JavaScript keeps getting stripped
Last modified: August 20, 2016

---

# onchange JavaScript keeps getting stripped

 *  [Meers007](https://wordpress.org/support/users/meers007/)
 * (@meers007)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/onchange-javascript-keeps-getting-stripped/)
 * I have an interesting dilemma with trying to use JavaScript.
 * Website and post: [http://www.lambdachi.org/candc/chapter-news-december-2011](http://www.lambdachi.org/candc/chapter-news-december-2011)
 * On this page, I have a `<select>` menu that will jump to the chapter when it 
   uses `onchange` (I’ve severely cut down the list so you get my point):
 *     ```
       Jump to chapter: <select onchange='location.hash=this.options[this.selectedIndex].value;'>
       <option value='Alabama (Alpha-Phi)'>Alabama (Alpha-Phi)</option>
       <option value='Alberta (Epsilon-Rho) '>Alberta (Epsilon-Rho)</option>
       <option value='Arkansas (Gamma-Chi) '>Arkansas (Gamma-Chi)</option>
       </select>
       ```
   
 * The problem is that WordPress continually strips out the onchange part of the
   code. This is a standard function with it, so I don’t quite understand.
 * I’ve read that I need to put it into the PHP-side, but it is on so few pages 
   that I wouldn’t want to change a template in WordPress. Does anyone have any 
   ideas as to keep this bit of code in there?
 * Thanks in advance!

The topic ‘onchange JavaScript keeps getting stripped’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Meers007](https://wordpress.org/support/users/meers007/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/onchange-javascript-keeps-getting-stripped/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
