SMF For Free Support Forum
Signup For Free Forum
December 21, 2014, 08:23:13 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register Chat  

Pages: [1] 2
  Print  
Author Topic: [Code] Drop Down Menu - With Different Background Colors for the List  (Read 9680 times)
0 Members and 1 Guest are viewing this topic.
simply sibyl
Helpers
*
Offline Offline

Posts: 14347


On hiatus


View Profile WWW
Total Badges: 31
Badges: (View All)
Level 6 Poll Voter Webmaster Arcade Highscore Windows User
« on: October 28, 2006, 11:06:51 pm »

This is a normal drop down menu, however you can change the colors of the background in the list.  Replace each instance of #FFFFFF  with the color code of your choice.

value=#          (replace # with the address you want them to go to when you click on an item in the list)
---Menu---       (replace with the name you want for the item in the list)

Leave ---Menu--- on the first line and it will show Menu on the drop down when not in use.
(change to whatever wording you prefer)



Code:

<form name="color">
<select name="menu"

onChange="location=document.color.menu.options[document.color.menu.selectedIndex].value;"
value="GO">

<option style="background-color: #FFFFFF" value="#">---Menu---</option>
<option style="background-color: #FFFFFF" value="#">---Menu---</option>
<option style="background-color: #FFFFFF" value="#">---Menu---</option>
<option style="background-color: #FFFFFF" value="#">---Menu---</option>
<option style="background-color: #FFFFFF" value="#">---Menu---</option>
<option style="background-color: #FFFFFF" value="#">---Menu---</option>

</select>
</form>



If you would prefer the links to open in another window do the code this way instead:

Code:
<form name="form1">
<select name="menu" onChange="window.open(document.form1.menu.options[document.form1.menu.selectedIndex].value);">

<option style="background-color: #FFFFFF" value="#">---Menu---</option>
<option style="background-color: #FFFFFF" value="#">---Menu---</option>
<option style="background-color: #FFFFFF" value="#">---Menu---</option>
<option style="background-color: #FFFFFF" value="#">---Menu---</option>

</select>
</form>
« Last Edit: September 02, 2008, 12:13:04 am by simply sibyl » Logged
TigerBeachMom
SMF For Free Newbie
*
Offline Offline

Posts: 4


View Profile
Total Badges: 9
Badges: (View All)
Topic Starter Combination Level 2 Level 1 First Post
« Reply #1 on: September 25, 2007, 01:03:57 pm »

Correct

The drop down menus are there but the links aren't working.  The first drop down worked once and then it stopped working.  I'm totally lost now.  Wish Calgon would come take me away right about now.  Any suggestions? 

Some how I managed to alter my style sheet to get it exactly how I wanted it but I can't manage a drop down box.  Grin Grin  Yep, I'm brand spanking new to this world.  Grin Grin
« Last Edit: September 27, 2007, 11:19:00 am by TigerBeachMom » Logged
Mary
SMF For Free Sr. Member
*
Offline Offline

Posts: 434



View Profile WWW
Total Badges: 15
Badges: (View All)
Topic Starter Combination Level 3 Level 2 Level 1
« Reply #2 on: July 07, 2008, 12:02:48 am »

Forum Url: http://pogoinslowmo.smfforfree.com

I know this is an old topic, but I do need help.  I can get the drop down box to work just fine, but can only get one to work at a time.  If I put in two drop downs, then neither of them work.  I used the original code posted by Sibyl, which is

Code:
<!-- Begin Colored Drop Down Menu -->

<form name="color">
<select name="menu"

onChange="location=document.color.menu.options[document.color.menu.selectedIndex].value;"
value="GO">

<option style="background-color: #FFFFFF" value="#">---Menu---</option>
<option style="background-color: #FFFFFF" value="#">---Menu---</option>
<option style="background-color: #FFFFFF" value="#">---Menu---</option>
<option style="background-color: #FFFFFF" value="#">---Menu---</option>
<option style="background-color: #FFFFFF" value="#">---Menu---</option>
<option style="background-color: #FFFFFF" value="#">---Menu---</option>

</select>
</form>

Do I need to change something or add something with wanting to have two of them so they don't get confused and not work at all?  I even tried putting  <!-- Begin Colored Drop Down Menu 1-->  and  <!-- Begin Colored Drop Down Menu 2 -->, but that didn't work either.
Any suggestions or help will be greatly appreciated.
Logged

Vist us at www.pogojustpogo.smfforfree3.com
Best and Friendliest Pogo FanSite There Is!!
simply sibyl
Helpers
*
Offline Offline

Posts: 14347


On hiatus


View Profile WWW
Total Badges: 31
Badges: (View All)
Level 6 Poll Voter Webmaster Arcade Highscore Windows User
« Reply #3 on: July 07, 2008, 12:28:01 am »

Hi Red.  Yep its getting confused.  You need to name each one differently if you use more then one.

Do the first part of the 2nd one this way and they will both work for ya

Code:
<form name="color2">
<select name="menu2"

onChange="location=document.color2.menu2.options[document.color2.menu2.selectedIndex].value;"
value="GO">
Logged
Mary
SMF For Free Sr. Member
*
Offline Offline

Posts: 434



View Profile WWW
Total Badges: 15
Badges: (View All)
Topic Starter Combination Level 3 Level 2 Level 1
« Reply #4 on: July 09, 2008, 09:48:01 pm »

Thank you Sib.  I knew it couldn't be too difficult, but I couldn't figure out what to change.  Thanks so much hun, you know you are always my hero.   smitten
Logged

Vist us at www.pogojustpogo.smfforfree3.com
Best and Friendliest Pogo FanSite There Is!!
Stitch
SMF For Free Full Member
*
Offline Offline

Posts: 213


VMK will always remain in my heart.


View Profile WWW
Total Badges: 14
Badges: (View All)
Topic Starter Combination Level 3 Level 2 Level 1
« Reply #5 on: September 01, 2008, 09:49:20 pm »

and here is stitch with yet another near impossible to answer question! lets hear it now.

Is there anyway i can make it so its a tab

whoo thats all for now
Logged

simply sibyl
Helpers
*
Offline Offline

Posts: 14347


On hiatus


View Profile WWW
Total Badges: 31
Badges: (View All)
Level 6 Poll Voter Webmaster Arcade Highscore Windows User
« Reply #6 on: September 01, 2008, 10:50:46 pm »

and here is stitch with yet another near impossible to answer question! lets hear it now.

Is there anyway i can make it so its a tab

whoo thats all for now

If you are wanting to use Custom Tabs so that you click on the tab or mouseover the tab and have a dropdown box -  NO.   You can not put code there, only a url... so there would not be a way to do that.

You could do something in your header like put a tab at the top of your forum and use a dropdown menu script - that'ld work  - sent ya a pm to show ya what i mean

« Last Edit: September 01, 2008, 11:12:56 pm by simply sibyl » Logged
clairebear
SMF For Free Master
*
Offline Offline

Posts: 1019



View Profile
Total Badges: 23
Badges: (View All)
Fifth year Anniversary Search Level 5 1000 Posts Poll Voter
« Reply #7 on: July 20, 2009, 07:49:15 am »

whats a drop down menu?
Would it go to each catergory?
and this comes up where?
Im really confused
Logged

www.teardrop.mysmf.com

A support forum for support in loss from early miscarriage to five years.
Andrew
Helpers
*
Offline Offline

Posts: 2055

Andrew at your service


View Profile WWW
Total Badges: 27
Badges: (View All)
Apple User Mobile User Fifth year Anniversary Webmaster Fourth year Anniversary
« Reply #8 on: July 20, 2009, 10:45:21 am »

whats a drop down menu?
Would it go to each catergory?
and this comes up where?
Im really confused

A drop-down menu is exactly how it sounds, its a menu that will drop-down with options when you click the down-arrow on it.

If you place the code in your header, it will show up at the top. If you place it in the fotter, it shows up in the bottom.

You can also place it in an EzPortal block so you can have it show up where ever you would like. Smiley
Logged

clairebear
SMF For Free Master
*
Offline Offline

Posts: 1019



View Profile
Total Badges: 23
Badges: (View All)
Fifth year Anniversary Search Level 5 1000 Posts Poll Voter
« Reply #9 on: July 20, 2009, 11:31:32 am »

that sounds cool
i think ive tried this b4 tho and tried to make it go to catergories on the forum but it ddint work
did i do something wrong or is this the case?
Logged

www.teardrop.mysmf.com

A support forum for support in loss from early miscarriage to five years.
clairebear
SMF For Free Master
*
Offline Offline

Posts: 1019



View Profile
Total Badges: 23
Badges: (View All)
Fifth year Anniversary Search Level 5 1000 Posts Poll Voter
« Reply #10 on: July 20, 2009, 11:42:40 am »

hmm it ses it has to go to address so i take it it cant drop down catergories as catergories dont have addresses lol
so what would this be used for/
To send people to other sites?
xx
Logged

www.teardrop.mysmf.com

A support forum for support in loss from early miscarriage to five years.
simply sibyl
Helpers
*
Offline Offline

Posts: 14347


On hiatus


View Profile WWW
Total Badges: 31
Badges: (View All)
Level 6 Poll Voter Webmaster Arcade Highscore Windows User
« Reply #11 on: July 20, 2009, 12:01:43 pm »

clair - You set up the options in the dropdown box to go to whatever url's you want.  If I am reading you correctly you wondered if it could be used to make a dropdown box that has your forum's categorys in it?   Yes you can.   When you click on one in the dropdown box it will take you to that area on the forum where that Category is - not inside it.   Since you are using images for the Category names its a little trickier to get the url for the categorys but it can be done.   Go inside one of the Boards in a Category.   You'll see the image for the Category  in the navigation link at the top (under the tabs)    Right mouse click on the Category name, click Copy Shortcut.
Logged
clairebear
SMF For Free Master
*
Offline Offline

Posts: 1019



View Profile
Total Badges: 23
Badges: (View All)
Fifth year Anniversary Search Level 5 1000 Posts Poll Voter
« Reply #12 on: August 05, 2009, 03:02:14 am »

copy shortcut dont come up Sad
just copy
Logged

www.teardrop.mysmf.com

A support forum for support in loss from early miscarriage to five years.
simply sibyl
Helpers
*
Offline Offline

Posts: 14347


On hiatus


View Profile WWW
Total Badges: 31
Badges: (View All)
Level 6 Poll Voter Webmaster Arcade Highscore Windows User
« Reply #13 on: August 05, 2009, 06:56:45 am »

copy shortcut dont come up Sad
just copy

If you put your mouse on top of the link,  right mouse click -   in IE you will see copy shortcut,  in firefox you will see copy link location.

Your  "Welcome to Teardrop" Category would be:
http://www.tdsupport.org/index.php?action=forum#2
« Last Edit: August 05, 2009, 07:11:27 am by simply sibyl » Logged
clairebear
SMF For Free Master
*
Offline Offline

Posts: 1019



View Profile
Total Badges: 23
Badges: (View All)
Fifth year Anniversary Search Level 5 1000 Posts Poll Voter
« Reply #14 on: August 11, 2009, 05:53:08 am »

i went to the boards in admin and went to the catergory n done it there by right clicking on the image is that ok?
i got
http://www.tdsupport.org/index.php?action=manageboards;sa=cat;cat=2
Logged

www.teardrop.mysmf.com

A support forum for support in loss from early miscarriage to five years.


Pages: [1] 2
  Print  
 
Jump to:  



Powered by SMF 1.1.20 | SMF © 2013, Simple Machines