|
Post by rhondairv on Apr 26, 2010 4:47:21 GMT -8
A code that allows us to add many colors in a drop down menu and the color name in the drop menu is the color to pick.
Currently, i go to http://www.w3schools.com/html/html_colornames.asp to get colors. It would be great to have as many choices as we like.
Thanks for your consideration ;D
|
|
|
Post by Wormopolis on Apr 26, 2010 6:41:52 GMT -8
look for
[CB] Extra Colors in 'Drop Down' menu
in the PBS code database
|
|
|
Post by rhondairv on Apr 26, 2010 10:25:34 GMT -8
Yes, i tried that ,but it doesn't work for me. It changes nothing. I still have the regular drop down.
|
|
|
Post by Wormopolis on Apr 26, 2010 12:13:52 GMT -8
well it might be easier to just fix the one you got then to go through all the effort to write a new code. otherwise it kinda just looks like plagiarism to the other coders.
post the code the way you currently have it edited.
|
|
|
Post by rhondairv on Apr 27, 2010 16:47:32 GMT -8
<script type="text/javascript"> <!-- var color=[]; color[0]=["CC0066","DeepPink"]; color[1]=["DC143C","Crimson"]; color[2]=["FF7F50","Coral"]; color[3]=["9400D3","DarkViolet"]; color[4]=["1E90FF","DodgerBlue"]; color[5]=["FFD700","Gold"]; color[6]=["FFFFF0","Ivory"]; color[7]=["00FF00","Lime"]; color[8]=["FFA500","Orange"]; color[9]=["FF0000","Red"]; color[10]=["ADD8E6","LightBlue"];
if(document.postForm) { var colorSelector = document.postForm.color; for(e=0; e<color.length; e++) { var re = document.createElement('option') re.value = color[e][0]; re.appendChild(document.createTextNode(color[e][1])); colorSelector.appendChild(re); } color="Green">var option = colorSelector.options; for(c=0; c<option.length; c++) { if(option[c].value) { option[c].style.color = option[c].value; } } } //--> </script>
|
|
|
Post by Wormopolis on Apr 27, 2010 19:53:38 GMT -8
somehow you added in something to the beginning of a line that shouldnt have been edited:
color="Green">var option = colorSelector.options;
change that to:
var option = colorSelector.options;
|
|
|
Post by rhondairv on Apr 27, 2010 22:30:03 GMT -8
Ahhhh, that's how it is in the database. Must be an error there. Thanks again!!
|
|
|
Post by Wormopolis on Apr 28, 2010 8:30:49 GMT -8
send a PM to jordan or todge and let them know so they can fix it.
|
|
|
Post by rhondairv on Apr 28, 2010 13:57:36 GMT -8
ok, will do Thanks again!
|
|