WordPress.org

Ready to get started?Download WordPress

Forums

Problem with wp_dropdown_categories after upgrade to 2.6 (3 posts)

  1. Anonymous
    Unregistered
    Posted 6 years ago #

    After upgrade to 2.6, my "change-page-on-select-without-submiy-button"-dropdowns wont work. Any ideas? Here is the code.
    (I have four different dropdowns depending on category)

    Before <head> I have this script:

    <script language="JavaScript" type="text/javascript" lang='javascript' xml:lang="javascript">
    <!--
        function onCatChange(element) {
    
    		var dropdown = document.getElementById(element);
    		if ( dropdown.options[dropdown.selectedIndex].value > 0 ) {
    			location.href = "http://www.mysite.com/blogg/?cat="+dropdown.options[dropdown.selectedIndex].value;
    		}
        }
    -->
    </script>

    And then in the <body>-section I have this code for the for the four different dropdowns.

    <?php wp_dropdown_categories('show_count=1&hierarchical=1&orderby=name&name=cat1&hide_empty=0&child_of=260'); ?>
    
    <?php wp_dropdown_categories('show_count=1&hierarchical=1&orderby=name&name=cat2&hide_empty=0&child_of=261'); ?>
    
    <?php wp_dropdown_categories('show_count=1&hierarchical=1&orderby=name&name=cat3&hide_empty=0&child_of=262'); ?>
    
    <?php wp_dropdown_categories('show_count=1&hierarchical=1&orderby=name&name=cat4&hide_empty=0&child_of=263'); ?>

    Please help me.
    Ah, I have to add that the problem is that nothing happends when I select a option.

  2. Anonymous
    Unregistered
    Posted 6 years ago #

    Please anyone?

  3. Anonymous
    Unregistered
    Posted 6 years ago #

    Someone help me.. really need help.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.