Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2012
    Posts
    99
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Select menu and autofill help

    Hi, I cant seem to find an answer to this that works, so any help is much appreciated.

    I have two select menus:

    eg

    Code:
     Sub Species <select name="marinesubspeciesselect" id="marinesubspeciesselect">
      <option value="">Select Option</option>
      <option value="AngelFish" disabled>Angelfish</option>
      <option value="AngelFish Large" disabled>Angelfish Large</option>
      <option value="Blue ring angelfish">Blue ring angelfish</option>
      <option value="Arabian angelfish">Arabian angelfish</option>
    </select>
    and

    Code:
     Sub Species Scientific<select name="marinespeciesScientific" id=""marinespeciesScientific">
      <option value="">Select Option</option>
      <option value="AngelFish Large" disabled>Angelfish Large</option>
      <option value="Pomacanthus annularis">Pomacanthus annularis</option>
      <option value="Pomacanthus asfur">Pomacanthus asfur</option>
    </select>
    What I need as there is such a huge amount of fish species, is for the user to select the Sub Species of fish; ie Blue Ring Angelfish and for the select menu "marinespeciesScientific" to automatically fill with the correct Scientific Name for that fish.

    ie. if the user selects Blue ring angelfish then the "marinespeciesScientific" menu to automaticaly display Pomacanthus annularis. And the same for the rest of the fish.

    Is this possible, and if so I would appreciate some guidance.

    Many Thanks

  • #2
    New Coder
    Join Date
    Oct 2012
    Posts
    99
    Thanks
    16
    Thanked 0 Times in 0 Posts
    This is what I got for the menus, but the code doesnt seem to work

    Code:
      SubSpecies:&nbsp;<select name="tropicalSubSpeciesSelect" onchange="document.getElementById('tropicalspeciesScientific').value = document.getElementById('tropicalSubSpeciesSelect').value">
      <option value="Tropical Fish" disabled>Tropical Fish</option>
      <option value="Tropical Fish" disabled>Anabantids</option>
      <option value="siamese Fighting Fish">Siamese fighting fish/betta</option>
      <option value="Dwarf Gourami">Dwarf Gourami</option>
      <option value="Spotted Climbing Perch">Spotted climbing perch</option>
      <option value="Kissing Gourami">Kissing Gourami</option>
      <option value="Paradise Fish">Paradise Fish</option>
      <option value="Giant Gourami">Giant Gourami</option>
      <option value="Giant Red Fin Gourami">Giant red-fin gourami</option>
      <option value="Pearl Gourami">Pearl Gourami</option>
      <option value="Moonlight Gourami">Moonlight Gourami</option>
      <option value="Blue Three Spot Gourami">Blue/Three-spot gourami</option>
      <option value="Catfish" disabled>Catfish</option>
      <option value="Bristle-nosed Catfish">Bristle-nosed Catfish</option>
      <option value="Bi-coloured Banjo">Bi-Coloured Banjo</option>
      <option value="Adolfos Cory">Adolfo's Cory</option>
      <option value="Bronze Albino Cory">Bronze/Albino cory</option>
      <option value="Peppered cory">Peppered cory</option>
      <option value="Panda cory">Panda cory</option>
      <option value="Three-line cory">Three-line cory</option>
      <option value="Shark catfish">Shark catfish</option>
      <option value="Zebra pleco, L046">Zebra pleco, L046</option>
      <option value="Common pleco">Common pleco</option>
      <option value="Glass catfish">Glass catfish</option>
      <option value="Sailfin marbled catfish">Sailfin marbled catfish</option>
      <option value="Dwarf/Golden otocinclus">Dwarf/Golden otocinclus</option>
      <option value="Otocinclus">Otocinclus</option>
      <option value="Red-tailed catfish">Red-tailed catfish</option>
      <option value="Pictus catfish">Pictus catfish</option>
      <option value="Clown Synodontis">Clown Synodontis</option>
      <option value="Cuckoo Synodontis">Cuckoo Synodontis</option>
      <option value="Waterlot's Synodontis">Waterlot's Synodontis</option>  
      <option value="Characins" disabled>Characins</option>
      <option value="Freshwater barracuda">Freshwater barracuda</option>  
      <option value="Pink-Tailed Chalceus">Pink-Tailed Chalceus</option>  
      <option value="Pacu">Pacu</option>  
      <option value="Pike characin / Slant-nosed gar">Pike characin / Slant-nosed gar</option>  
      <option value="Common hatchet">Common hatchet</option>  
      <option value="Black Widow tetra">Black Widow tetra</option>  
      <option value="Rummy-nosed tetra">Rummy-nosed tetra</option>  
      <option value="Buenos Aires tetra">Buenos Aires tetra</option>  
      <option value="Rummy-nosed tetra">Rummy-nosed tetra</option>  
      <option value="Glowlight tetra">Glowlight tetra</option>  
      <option value="Wolf fish / Tiger Fish">Wolf fish / Tiger Fish</option>  
      <option value="Bleeding Heart tetra">Bleeding Heart tetra</option>  
      <option value="Black Neon tetra">Black Neon tetra</option>  
      <option value="Serpae tetra">Serpae tetra</option>  
      <option value="Silver dollar">Silver dollar</option>  
      <option value="Red Eye tetra">Red Eye tetra</option>  
      <option value="Dwarf Pencilfish">Dwarf Pencilfish</option>  
      <option value="Cardinal tetra">Cardinal tetra</option>  
      <option value="Neon tetra">Neon tetra</option>  
      <option value="Red Pacu">Red Pacu</option>  
      <option value="Red-Bellied Piranha">Red-Bellied Piranha</option>  
      <option value="Silver prochilodus">Silver prochilodus</option>  
      <option value="White/Black Piranha">White/Black Piranha</option>  
      <option value="Cichlids" disabled>Cichlids</option>  
      <option value="Malawi Cichlids" disabled>Malawi Cichlids</option>  
      <option value="Redfin Hap">Redfin Hap</option>  
      <option value="Malawi Eye-Biter">Malawi Eye-Biter</option>  
      <option value="Rusty cichlid">Rusty cichlid</option>  
      <option value="Electric yellow lab">Electric yellow lab</option>  
      <option value="Malawi golden cichlid">Malawi golden cichlid</option>  
      <option value="Red zebra">Red zebra</option>  
      <option value="Kenyi">Kenyi</option>  
      <option value="Yellow-tailed acei">Yellow-tailed acei</option>  
      <option value="Bumblebee cichlid">Bumblebee cichlid</option>  
      <option value="Powder Blue/Pindani">Powder Blue/Pindani</option>  
      <option value="Tanganyika Cichlids" disabled>Tanganyika Cichlids</option>  
      <option value="Frontosa">Frontosa</option>  
      <option value="Brown julie">Brown julie</option>  
      <option value="Chequered julie">Chequered julie</option>  
      <option value="Golden julie">Golden julie</option>  
      <option value="Convict julie">Convict julie</option>  
      <option value="Lyretail cichlid">Lyretail cichlid</option>  
      <option value="Dwarf Cichlids" disabled>Dwarf Cichlids</option> 
      <option value="Agassizi's dwarf cichlid">Agassizi's dwarf cichlid</option>  
      <option value="Cockatoo cichlid">Cockatoo cichlid</option>  
      <option value="Macmaster's dwarf cichlid">Macmaster's dwarf cichlid</option>  
      <option value="Panda dwarf cichlid">Panda dwarf cichlid</option>  
      <option value="Dwarf Flag Cichlid, Flag Acara">Dwarf Flag Cichlid, Flag Acara</option>  
      <option value="Ram cichlid">Ram cichlid</option>  
      <option value="Kribensis">Kribensis</option>  
      <option value="American Cichlids" disabled>American Cichlids</option>  
      <option value="Port cichlid">Port cichlid</option>  
      <option value="Blue acara">Blue acara</option>  
      <option value="Green terror">Green terror</option>  
      <option value="Cockatoo cichlid">Oscar</option>  
      <option value="Parrot cichlid">Parrot cichlid</option>  
      <option value="Convict cichlid">Convict cichlid</option>  
      <option value="Severum">Severum</option>  
      <option value="Rainbow cichlid">Rainbow cichlid</option>  
      <option value="Cockatoo cichlid">Flag cichlid</option>  
      <option value="Jack Dempsey">Jack Dempsey</option>  
      <option value="Salvin's cichlid">Salvin's cichlid</option>  
      <option value="Angelfish">Angelfish</option>  
      <option value="Discus">Discus</option>  
      <option value="Firemouth">Firemouth</option>  
      <option value="Cypriniformes" disabled>Cyprinformes</option>  
      <option value="Silver/Bala shark">Silver/Bala shark</option>  
      <option value="Tinfoil barb">Tinfoil barb</option>  
      <option value="Pakistan loach">Pakistan loach</option>  
      <option value="Clown loach">Clown loach</option>  
      <option value="Zebra/Candy-stripe loach">Zebra/Candy-stripe loach</option>  
      <option value="Celestial Pearl Danio">Celestial Pearl Danio</option>  
      <option value="Siamese algae eater">Siamese algae eater</option>  
      <option value="Zebra danio">Zebra danio</option>  
      <option value="Red-tailed black shark">Red-tailed black shark</option>  
      <option value="Red finned/Rainbow shark">Red finned/Rainbow shark</option>  
      <option value="Flying fox">Flying fox</option>  
      <option value="Algae eater/Sucking loach">Algae eater/Sucking loach</option>  
      <option value="Rosy barb">Rosy barb</option>  
      <option value="Red Line Torpedo barb">Red Line Torpedo barb</option>  
      <option value="Black Ruby barb">Black Ruby barb</option>  
      <option value="Pentazona barb">Pentazona barb</option>  
      <option value="Golden barb">Golden barb</option>  
      <option value="Tiger barb">Tiger barb</option>  
      <option value="Cherry barb">Cherry barb</option>  
      <option value="Red Scissortail">Red Scissortail</option>  
      <option value="Harlequin Rasbora">Harlequin Rasbora</option>  
      <option value="Livebearers" disabled>Livebearers</option>  
      <option value="Knife Livebearer">Knife Livebearer</option>  
      <option value="Sailfin molly">Sailfin molly</option>  
      <option value="Guppy">Guppy</option>  
      <option value="Swordtail">Swordtail</option>  
      <option value="Platy">Platy</option>  
      <option value="Rainbowfish" disabled>Rainbowfish</option>  
      <option value="Red rainbow">Red rainbow</option>  
      <option value="Threadfin rainbow">Threadfin rainbow</option>  
      <option value="Western rainbow">Western rainbow</option>  
      <option value="Boeseman's rainbow">Boeseman's rainbow</option>  
      <option value="Lake Kutubu rainbow">Lake Kutubu rainbow</option>  
      <option value="Neon rainbow">Neon rainbow</option>  
      <option value="Red-Striped rainbow">Red-Striped rainbow</option>  
      <option value="Banded rainbow">Banded rainbow</option>  
      <option value="miscellaneous" disabled>Miscellaneous FW</option>  
      <option value="Clown Knifefish">Clown Knifefish</option>  
      <option value="Elephant nose">Elephant nose</option>  
      <option value="Killis">Killis</option>  
      <option value="South American leaf fish">South American leaf fish</option>  
      <option value="Mono, Malayan Angel">Mono, Malayan Angel</option>  
      <option value="Marbled Knifefish">Marbled Knifefish</option>  
      <option value="Asian arowana/Dragon fish">Asian arowana/Dragon fish</option>  
      <option value="Archer fish">Archer fish</option>  
      <option value="Bichirs and Ropefish">Bichirs and Ropefish</option>  
      <option value="Freshwater and Brackish Pufferfish">Freshwater and Brackish Pufferfish</option>  
      <option value="Scat">Scat</option>  
      <option value="Coius / Datnioides">Coius / Datnioides</option>  
      <option value="Brackish" disabled>Brackish</option>  
      <option value="New Guinea Tigerfish">New Guinea Tigerfish</option>  
      <option value="Silver Tigerfish">Silver Tigerfish</option>  
      <option value="Shark catfish">Shark catfish</option>  
      <option value="Mono, Malayan Angel">Mono, Malayan Angel</option>  
      <option value="Sebae Mono, Finger Mono">Sebae Mono, Finger Mono</option>  
      <option value="African Mudskipper">African Mudskipper</option>  
      <option value="Indian Mudskipper">Indian Mudskipper</option>  
      <option value="Common/Green Scat">Common/Green Scat</option>  
      <option value="Silver Scat">Silver Scat</option>  
      <option value="Figure-eight puffer">Figure-eight puffer</option>  
      <option value="Green/Topaz Puffer">Green/Topaz Puffer</option>  
      <option value="Green Spotted Puffer">Green Spotted Puffer</option>  
      <option value="Large-scaled Archer fish">Large-scaled Archer fish</option>  
      <option value="Archer fish">Archer fish</option>  
      <option value="Shrimp" disabled>Shrimp</option>  
      <option value="Amano Shrimp">Amano Shrimp</option>  
      <option value="Bee Shrimp">Bee Shrimp</option>  
      <option value="Crystal Red Shrimp">Crystal Red Shrimp</option>  
      <option value="Red Cherry Shrimp">Red Cherry Shrimp</option>  
    
      </select>
    <br>
    
    /* This is just part pf the second menu */
    
    Tropical Scientific Name <select name="scientificTropicalName" id="scientificTropicalName">
    <option value="">Select Option</option>
       <option value="Betta splendens" >Betta splendens</option>
      <option value="Colisa lalia">Colisa lalia</option>
      <option value="Ctenopoma acutirostre">Ctenopoma acutirostre</option>
    
    </select>
    Any Ideas


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •