1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Two dropdown boxes

Discussion in 'JavaScript' started by sakto, Jun 13, 2010.

  1. #1
    I have this code in my wordpress submit form;

    <?php wp_dropdown_categories('show_option_none='.__('Select category', "wpct").'&hide_empty=0&hierarchical=1&name=category); ?>

    It shows the categories to choose from in the dropdown like below;

    MainCat1
    --MainCat1sub1
    --MainCat1sub2
    --MainCat1sub3
    MainCat2
    --MainCat2sub1
    --MainCat2sub2
    --MainCat2sub3

    I want to have two dropdown where the first one will show only the parent or the main category. And when a particular Main category is selected it will show a second dropdown showing its child or subcategory. This should be done without submitting the form first.

    I've already tried some tutorials for it's implementation but somehow I got stuck with just my basic knowledge about java. Anyway, I'm donating 10$ for those who can provide me with a working code through pm.
     
    sakto, Jun 13, 2010 IP