iAlex Newcomer
  member is offline
![[avatar]](http://img232.imageshack.us/img232/2306/lickow2.gif)
Stop the Melancholy; please?
Joined: May 2007 Gender: Male  Posts: 31 Location: Sydney Karma: 1 |  | [CB] Color Palette Square Picker « Thread Started on Aug 3, 2007, 12:55pm » | |
Okay, when creating a message, this code will remove the drop down colour menu, and instead put in a colour palette.
Here is a preview: Click
Global Footer.
Cross Browser.
<script type="text/javascript"> <!--
/*Colour Palette Square Picker - By iAlex - Open Source*/ if(document.postForm){ var iColor=document.postForm.color var iColorTr=document.createElement('tr'); var iColorTdDes=document.createElement('td'); var iColorTd=document.createElement('td'); iColorTdDes.width='30%'; iColorTdDes.className='windowbg2'; iColorTdDes.innerHTML='<font size="2">Add Colors:</font>'; iColorTr.appendChild(iColorTdDes); iColorTd.width='70%'; iColorTd.className='windowbg2'; iColorTr.appendChild(iColorTd); iColor.parentNode.parentNode.parentNode.parentNode.insertBefore(iColorTr, iColor.parentNode.parentNode.parentNode.nextSibling); var iOpt=iColor.options; iOkay='<table><tr>'; for(i=1;i<iOpt.length;i++){ iOkay+='<td width="20" height="20" bgcolor="'+iOpt.item(i).value+'" onmouseover="this.style.cursor=\'pointer\'" onclick="javascript:add(\'[color='+iOpt.item(i).value+']\',\'[/color]\')"></td><td width="2"></td>'; } iOkay+='</tr></table>'; iColorTd.innerHTML=iOkay iColor.style.display='none'; }
//--> </script>
|
![[image]](http://img213.imageshack.us/img213/1474/alexsiggw6.png) Metaphysical existence.
|
|