Revolution X

Coding Community => Coding Snippets => Topic started by: Agent Moose on February 22, 2009, 03:30:38 pm



Title: Add More Colors to Dropdown
Post by: Agent Moose on February 22, 2009, 03:30:38 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 :)

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

Enjoy :)


Title: Re: Add More Colors to Dropdown
Post by: skillag3 on February 22, 2009, 03:33:02 pm
Got a question. How does this work, like is it for all the drop down boxes or do you just create one?


Title: Re: Add More Colors to Dropdown
Post by: Agent Moose on February 22, 2009, 05:55:34 pm
Its for the one in the Quick Reply, and the one on the reply screen.


Title: Re: Add More Colors to Dropdown
Post by: Mojobojo82 on June 17, 2009, 05:59:03 am
Thx Moose. Adding it now  :D