Title: Drop down without a Submit Button using JavaScript (for pages)
Last modified: August 19, 2016

---

# Drop down without a Submit Button using JavaScript (for pages)

 *  [Millen](https://wordpress.org/support/users/millen/)
 * (@millen)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/drop-down-without-a-submit-button-using-javascript-for-pages/)
 * Drop down without a Submit Button using JavaScript (for pages)
 * How can i do this for pages
 *     ```
       <li id="categories"><h2><?php _e('Posts by Category'); ?></h2>
       	<?php wp_dropdown_categories('show_option_none=Select category'); ?>
   
       <script type="text/javascript"><!--
           var dropdown = document.getElementById("cat");
           function onCatChange() {
       		if ( dropdown.options[dropdown.selectedIndex].value > 0 ) {
       			location.href = "<?php echo get_option('home');
       ?>/?cat="+dropdown.options[dropdown.selectedIndex].value;
       		}
           }
           dropdown.onchange = onCatChange;
       --></script>
       </li>
       ```
   

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

 *  Thread Starter [Millen](https://wordpress.org/support/users/millen/)
 * (@millen)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/drop-down-without-a-submit-button-using-javascript-for-pages/#post-1035382)
 * Does anyone know how to do this?
 *  Thread Starter [Millen](https://wordpress.org/support/users/millen/)
 * (@millen)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/drop-down-without-a-submit-button-using-javascript-for-pages/#post-1035409)
 * Is there anyone out there that know how to do this?
    To make a drop down list
   with no submit button, that contains pages instead of categories.
 * Any wordpress expert/guru out there that know how to solve this?
 * /Thanks
 *  Thread Starter [Millen](https://wordpress.org/support/users/millen/)
 * (@millen)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/drop-down-without-a-submit-button-using-javascript-for-pages/#post-1035450)
 * Is their anybody out there that knows where i can get help with this at least?
   I have search everywhere for days now and i can’t find any related information.
 * Help would be very much appreciated…
 *  Thread Starter [Millen](https://wordpress.org/support/users/millen/)
 * (@millen)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/drop-down-without-a-submit-button-using-javascript-for-pages/#post-1035485)
 * anyone?
 *  [amaeria](https://wordpress.org/support/users/amaeria/)
 * (@amaeria)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/drop-down-without-a-submit-button-using-javascript-for-pages/#post-1035569)
 * if someone know, i’m very interested in this tip too 🙂
    many thanks!

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

The topic ‘Drop down without a Submit Button using JavaScript (for pages)’ is closed
to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [amaeria](https://wordpress.org/support/users/amaeria/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/drop-down-without-a-submit-button-using-javascript-for-pages/#post-1035569)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
