Simple Machine Codes
December 15, 2018, 04:48:44 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
 
  Home Help Search Arcade Gallery Affiliates Code Index Staff List Calendar Members Login Register  

Add Colors to Dropdown Menu

Pages: [1]   Go Down
  Print  
Author Topic: Add Colors to Dropdown Menu  (Read 553 times)
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« on: February 23, 2009, 06:48:10 pm »

Footers:
Code:
<script>
function AddMore(Name,HEX){
//Created by Agent Moose (revolutionx.smfforfree3.com)
var sel = document.getElementsByTagName("select");
for(x=0;x<sel.length;x++){
if(sel[x].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id == "postmodify"){
var num = sel[x].options;
wo = num[num.length] = new Option(Name,HEX);
};};};
AddMore("NAME","COLOR/HEX");
</script>

I decided to try to do this again, and this time, it worked Smiley

NAME = The Name for that option
COLOR/HEX = The Color/Hex number for the text.

Enjoy Smiley
Report Spam   Logged



Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum | Buy traffic for your forum/website

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy