vForums Support > Programming & Coding :: Code Requests & Support :: > Support on color dropdown code

Support on color dropdown code - Posted By CåñåÐå™ (canada) on 9th Jul 08 at 9:34pm
It seems the code doesn't work on my forum for some reason {Confused}

Code:
 
  1. <script>
  2. /*Color Drop Down v1
  3. Created By Wrighty
  4. No Rip, Repost or Claiming*/
  5.  
  6. var color = {
  7.  
  8.     list: [
  9.         ["Black","000000"],
  10.         ["Gray","5C5C5C"],
  11.         ["Red","FF0000"],
  12.         ["Blue","0000FF"],
  13.         ["Green","00FF00"],
  14.         ["Yellow","FFFF00"],
  15.         ["Orange","FFA500"],
  16.         ["Pink","FF69B4"],
  17.         ["Maroon","B03060"],
  18.         ["Beige","F5F5DC"],
  19.         ["NavyBlue","000080"],
  20.         ["Brown","8B4513"],
  21.         ["Silver","C0C0C0"],
  22.         ["Teal","008080"],
  23.         ["Purple","551A8B"],
  24.         ["Gold","CDAD00"]
  25.     ],
  26.  
  27.     _s: document.createElement('select'),
  28.     _d: document.createElement('span'),
  29.     _p: get('ubbc_buttons','id'),
  30.     add: {
  31.         colors: function(){
  32.             color._s.options[0] = new Option('Choose Color','');
  33.             for(i=0;i<color.list.length;i++){
  34.                 color._s.options[i+1] = new Option(color.list[i][0],color.list[i][1]);
  35.             }
  36.         },
  37.         extra_features: function(){
  38.             color._d.style.paddingLeft = '20px';
  39.             color._s.onchange = function(){
  40.                 if(color._s.value!=''){
  41.                     add_ubbc('[color='+color._s.value+']','[/color]');
  42.                 }
  43.             };
  44.         },
  45.         drop_down: function(){
  46.             color._d.appendChild(color._s);
  47.             color._p.firstChild.insertBefore(color._d, color._p.firstChild.getElementsByTagName('br')[0]);
  48.         }
  49.     },
  50.     build: function(){
  51.         if(color._p){
  52.             this.add.colors();
  53.             this.add.extra_features();
  54.             this.add.drop_down();
  55.         }
  56.     }
  57. };
  58. color.build();
  59. </script>
 
its at the very top of my global footers.

Re: Support on color dropdown code - Posted By Michael (wrighty) on 9th Jul 08 at 10:18pm
link to forum? {Smile}

Re: Support on color dropdown code - Posted By Marc (cr0w) on 9th Jul 08 at 10:40pm
If you're talking about Mad House Creations, the code functions perfectly for me. {Unsure}

Which browser are you using? {Smile}

Re: Support on color dropdown code - Posted By CåñåÐå™ (canada) on 9th Jul 08 at 11:26pm
http://tropolis.virtualforums.co.uk/
Sorry about not having the link {Embarassed} .


 
If you're talking about Mad House Creations, the code functions perfectly for me. {Unsure}

Which browser are you using? {Smile}
No, Yes i knew it works on there {Smile} . I'm useing FF3.

Re: Support on color dropdown code - Posted By Michael (wrighty) on 9th Jul 08 at 11:30pm
Works fine for me on that forum ..... {Unsure}

What are you trying to do etc....

Re: Support on color dropdown code - Posted By CåñåÐå™ (canada) on 10th Jul 08 at 12:02am
Ok i just check it and yes it works for when i am making an new thread, but if i go to an post and i'm replying to the post and i click on an color it will not work.

If i was to click on reply in this post to reply to your and i wanted to do it with an color , and i click on the drop down and then the color but it doesn't show on the typing page. i hope you understand what i mean bro.

Re: Support on color dropdown code - Posted By Michael (wrighty) on 10th Jul 08 at 12:08am
That works as well .... I can't seem to find any bugs with it! {Unsure}

Re: Support on color dropdown code - Posted By CåñåÐå™ (canada) on 10th Jul 08 at 2:35am
It works for me on Mad House Creations.

But on my forum it wouldn't and i also tried it in IE and it did the samething, doen't work.

I have no idea why it works fine on one forum, and then it wouldn't on another.

My forum and Mad House Creations are the only forums i know that use this code.

BTW, it also works fine for me on my test forum .

{Confused} {Confused}

Re: Support on color dropdown code - Posted By Michael (wrighty) on 10th Jul 08 at 8:58am
It works fine for me on tropolis, I have just tested it.

Does it just not show? Or is it a matter of it not actually adding the 'colour' to the message box?

Re: Support on color dropdown code - Posted By CåñåÐå™ (canada) on 10th Jul 08 at 11:48am
It doesn't show this > [color = whatever] [/ color ] .(i did the spacing so you'll now what i mean) . But only when i'm trying to reply.

Re: Support on color dropdown code - Posted By Michael (wrighty) on 10th Jul 08 at 4:11pm
IT shows that for me fine! {Unsure}

Re: Support on color dropdown code - Posted By CåñåÐå™ (canada) on 10th Jul 08 at 5:28pm
OK but its not only me , i've ask others to try and they say it not working for them as well {Confused} .

I don't believe its the code Wrighty , i think something may be wrong with the forum itself. {Confused}

Try it useing your member account ?

Re: Support on color dropdown code - Posted By Michael (wrighty) on 10th Jul 08 at 6:30pm
I see ...

I have NO idea WHY! {Tongue Out}

Re: Support on color dropdown code - Posted By CåñåÐå™ (canada) on 10th Jul 08 at 8:21pm
 
I see ...

I have NO idea WHY! {Tongue Out}
Are you going to have Ross check it ?

let me know when i can try it to see if its working right.

Re: Support on color dropdown code - Posted By CåñåÐå™ (canada) on 11th Jul 08 at 3:38pm
Any word on why this .