• I’m doing a “dorp down links menu” for WordPress however when I click and go into “dogs” this option does’t remain selected. I know that code does’t understand I’m entering in the same web and this returns to default: ” Please select … “

    any help?

    <form name="event_type_selector" method="post" action="#">
    	<select name="url_list" class="event-type-selector-dropdown" onchange="gotosite()">
    		<option value="">Please select...</option>
    		<option value="?product_cat=para-perros">dogs</option>
    		<option value="?post=107&action=edit&message=6">alegoría</option>
    		<option value="?post_type=product&s=muneco">Menu</option>
    	</select>
    </form>
    <script language="javascript">
    	function gotosite() {
    		var URL = document.event_type_selector.url_list.options[document.event_type_selector.url_list.selectedIndex].value; window.location.href = URL;
    	}
    </script>
Viewing 2 replies - 1 through 2 (of 2 total)
  • cant see where your are passing the form value or on the select options to keep it selected. you may put an if statement to check if the option is for current page if yes then selected.

    Thread Starter Droiddoll

    (@droiddoll)

    sorry for asking easy questions. I will try to do that you say

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘“dorp down links menu” option does't remain selected’ is closed to new replies.