1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.



[Html] Drop Down List, Simple!

Discussion in 'General' started by Revo., May 12, 2009.

  1. Offline

    Revo. .sense {display:none;}

    Member Since:
    Dec 30, 2007
    Total Posts:
    4,477
    Likes Received:
    83
    Gender:
    Female
    Location:
    NY
    • Awards
    WHAT IT DOES
    Makes a click, drop down list using simple html forms. Anyone with a little coding knowhow can create forms like these. Great for listing affiliates or important links.

    WHERE IT GOES
    Anywhere you want it to appear. Treat it like adding text. Add a line break after and before it if you need to ( <br /> )

    MODIFICATIONS
    If you change the 'class' property to something else you can change what the box looks like. In order to make it match everyone's forum I have set the class to foruminput, which is the class used in skins to style the forum input.

    If you don't like how that standard looks you can make it 'class=dropdown' and you can go into your CSS and write something like this to style it:
    .dropdown { background-color#000000; color:#ffffff; text-align:center; font-size:10px; font-weight:bold; font-family:georgia; width: 150px;}

    If you have questions about styling it or adding things to this form, etc let me know via reply!
    Code: Select
    <!-- Form by Mer of http://rpg-directory.com-->
    <form><select name="select" size="1" class="forminput" name="menu"onchange="location.href=(form.select.options[form.select.selectedIndex].value)">
    
    <option value=''>Navigation</option>
    <option value='http://rpg-directory.com/'>RPG-D</option>
    <option value='http://rpg-directory.com/'>RPG-D</option>
    <option value='http://rpg-directory.com/'>RPG-D</option>
    <option value='http://rpg-directory.com/'>RPG-D</option>
    
    </select></form>
  2. Offline

    QueenBecky Member

    Member Since:
    Mar 7, 2009
    Total Posts:
    985
    Likes Received:
    20
    Gender:
    Female
    Location:
    Neither Here Nor There
    I don't know why... But for some reason, it isn't allowing the clicking on the things for the links...
  3. Offline

    Aki Banned

    Member Since:
    Jan 10, 2007
    Total Posts:
    2,939
    Likes Received:
    1,662
    Gender:
    Male
    • Awards
    Try this, changed a name because it is a reserved syntax, and added OnChange:


    Code: Select
    <!-- Form by Mer of http&#58;//rpg-directory.com-->
    <form name=&#34;ddl&#34;><select name=&#34;sl&#34; class=&#34;forminput&#34; OnChange=&#34;location.herf=ddl.sl.options&#91;selectedIndex&#93;.value&#34;>
    <option>-- Navigation Title --</option>
    <option value=&#34;link&#34;>Title</option>
    <option value=&#34;link&#34;>Title</option>  
    <option value=&#34;link&#34;>Title</option>
    <option value=&#34;link&#34;>Title</option>
    <option value=&#34;link&#34;>Title</option>
    </select></form>
  4. Offline

    QueenBecky Member

    Member Since:
    Mar 7, 2009
    Total Posts:
    985
    Likes Received:
    20
    Gender:
    Female
    Location:
    Neither Here Nor There
    Still isn't working...
  5. Offline

    Revo. .sense {display:none;}

    Member Since:
    Dec 30, 2007
    Total Posts:
    4,477
    Likes Received:
    83
    Gender:
    Female
    Location:
    NY
    • Awards
    /headesk! My bad

    Code: Select
    <!-- Form by Mer of http&#58;//rpg-directory.com-->
    <form><select name=&#34;select&#34; size=&#34;1&#34; class=&#34;forminput&#34; name=&#34;menu&#34;onchange=&#34;location.href=&#40;form.select.options&#91;form.select.selectedIndex&#93;.value&#41;&#34;>
    
    <option value=&#39;&#39;>Navigation</option>
    <option value=&#39;http&#58;//rpg-directory.com/&#39;>RPG-D</option>
    <option value=&#39;http&#58;//rpg-directory.com/&#39;>RPG-D</option>
    <option value=&#39;http&#58;//rpg-directory.com/&#39;>RPG-D</option>
    <option value=&#39;http&#58;//rpg-directory.com/&#39;>RPG-D</option>
    
    </select></form>
  6. Offline

    QueenBecky Member

    Member Since:
    Mar 7, 2009
    Total Posts:
    985
    Likes Received:
    20
    Gender:
    Female
    Location:
    Neither Here Nor There
    Newest code, works!

    Thanks loads!
  7. Offline

    Revo. .sense {display:none;}

    Member Since:
    Dec 30, 2007
    Total Posts:
    4,477
    Likes Received:
    83
    Gender:
    Female
    Location:
    NY
    • Awards
    Not a problem :) Fixed in the original thread for future use.
  8. Offline

    Revo. .sense {display:none;}

    Member Since:
    Dec 30, 2007
    Total Posts:
    4,477
    Likes Received:
    83
    Gender:
    Female
    Location:
    NY
    • Awards
    Your code has been approved and moved to the Coding Center board.

    Thanks for submitting!
  9. Offline

    LyghtChyld Member

    Member Since:
    Jan 22, 2010
    Total Posts:
    26
    Likes Received:
    0
    Thanks for this, it looks so much better to have drop downs for my Navigation. Plus I can place all the characters for my Admin and hopefully in the future Mods.
  10. Offline

    ftw! aw, suga

    Member Since:
    Jan 6, 2010
    Total Posts:
    102
    Likes Received:
    2
    Gender:
    Female
    Location:
    Minnesota
    • Awards
    Thanks so much for this code. <3 It's amazing.
  11. Offline

    mandarific WHOA HI.

    • Community Devoted
    Member Since:
    Dec 12, 2009
    Total Posts:
    2,334
    Likes Received:
    1,137
    Gender:
    Female
    Location:
    Wisconsin, USA
    <div align=center><span style='font-size:17pt;line-height:100%'>ACCEPTED GENERAL CODE</span>
    <span style='font-size:11pt;line-height:100%'>[color=7f323a]THANK YOU FOR YOUR SUBMISSION[/color]</span>
    Thank you for submitting to our codex and giving forums everywhere an easily installable piece of code to enrich their board! Keep up the great work and we look forward to seeing more from you!</div>
  12. Offline

    Sam Sweet true love never dies.<3

    Member Since:
    Aug 11, 2009
    Total Posts:
    93
    Likes Received:
    0
    Gender:
    Female
    Location:
    Wisconsin
    Totally works perfectly!
    Thanks!
  13. Offline

    waterside New Member

    Member Since:
    Sep 21, 2010
    Total Posts:
    8
    Likes Received:
    0
    Uhmm, I'm having trouble putting more than one in my sidebar. D:

    NEVERMIND. I fixed it :)
  14. Offline

    Black Boys Rock Like a Hurricane

    Member Since:
    Dec 30, 2008
    Total Posts:
    1,069
    Likes Received:
    56
    Location:
    NY, ny
    [sigh] it seems theres not a day that goes by where some damned code befouls my plans...

    how the heck do you add more than one dropdown without them going nuts and grouping together? and why does everything UNDER the dropdown menu on my sidebar [in fact the sidebar itself] vanish?
  15. Offline

    Hera hooch is crazy!

    • Graphics Artist
    Member Since:
    Apr 29, 2008
    Total Posts:
    1,917
    Likes Received:
    130
    Gender:
    Female
    Location:
    Australia
    • Awards
    Great code. Thanks for sharing!
  16. Offline

    Solomon Member

    Member Since:
    Jul 29, 2011
    Total Posts:
    65
    Likes Received:
    15
    Gender:
    Male
    I have used this on every single board I've run or helped run. It's a super nifty bit of html to have on hand.
    So I must bow and worship you for sharing it.
  17. Offline

    stormyhearted fighting against the tide

    Member Since:
    Apr 16, 2008
    Total Posts:
    519
    Likes Received:
    13
    Gender:
    Female
    Any idea why I can't get this to work in my forum descriptions in IPB?
  18. Offline

    xexes Community Devoted (M)

    • Rapid Reviewer
    • 'D Contributor
    • Community Devoted
    Member Since:
    Feb 20, 2011
    Total Posts:
    3,646
    Likes Received:
    5,577
    Gender:
    Male
    Location:
    USA
    • Awards
    Try giving each form a different name, see if it helps?

    Code: Select
    <form name="form1"><select ...
    </select></form>
    
    <form name="form2"><select ...
    </select></form>
    
    <form name="form3"><select ...
    </select></form>
    
  19. Offline

    stormyhearted fighting against the tide

    Member Since:
    Apr 16, 2008
    Total Posts:
    519
    Likes Received:
    13
    Gender:
    Female
    I can't get even one to show up- I haven't tried adding a second. :( Thanks for the thought, though! I'll keep it in mind if I get it to work.
  20. Offline

    xexes Community Devoted (M)

    • Rapid Reviewer
    • 'D Contributor
    • Community Devoted
    Member Since:
    Feb 20, 2011
    Total Posts:
    3,646
    Likes Received:
    5,577
    Gender:
    Male
    Location:
    USA
    • Awards
    Can you open up a separate help topic with a link to your board?

Share This Page