iAlex
Junior Member
Posts: 73
|
Post by iAlex on Dec 6, 2007 17:11:36 GMT -5
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: ClickGlobal Footer. Cross Browser. Open Source. <script type="text/javascript"> <!--
/*Colour Palette Square Picker - By iAlex - Open Source*/ if(document.postForm && document.postForm.color){ var iColor=document.postForm.color var iColorTr=iColor.parentNode.parentNode.parentNode.cloneNode(true); iColorTr.childNodes[0].firstChild.innerHTML='Add Colors:'; 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\';" onmousedown="javascript: aC(\''+iOpt.item(i).value+'\')"></td><td width="2"></td>'; } iOkay+='</tr></table>'; iColorTr.childNodes[1].innerHTML=iOkay iColor.style.display='none'; }
//--> </script>
|
|
Kahless
Administrator
Guitar Star
Posts: 1,045
|
Post by Kahless on Dec 6, 2007 19:14:52 GMT -5
Nice, was planning something similar
|
|