SMF For Free Support Forum
Signup For Free Forum
July 04, 2009, 11:33:58 pm *
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  

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

Posts: 11806


On vacation until July 6th


View Profile WWW
« 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

Some Helpful Links:
Support FAQ | Guides & Tutorials | Tips for Using Support
I do not do support via personal messages
TigerBeachMom
SMF For Free Newbie
*
Offline Offline

Posts: 4


View Profile
« 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
Granny1
SMF For Free Sr. Member
*
Offline Offline

Posts: 357



View Profile WWW
« 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
Global Moderator
*
Offline Offline

Posts: 11806


On vacation until July 6th


View Profile WWW
« 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

Some Helpful Links:
Support FAQ | Guides & Tutorials | Tips for Using Support
I do not do support via personal messages
Granny1
SMF For Free Sr. Member
*
Offline Offline

Posts: 357



View Profile WWW
« 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
« 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
Global Moderator
*
Offline Offline

Posts: 11806


On vacation until July 6th


View Profile WWW
« 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

Some Helpful Links:
Support FAQ | Guides & Tutorials | Tips for Using Support
I do not do support via personal messages


Pages: [1]
  Print  
 
Jump to:  

cheap low cost web hosting reviews

Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC
ServerBeach Coupon
Page created in 0.22 seconds with 17 queries.