ialex
New Member
Posts: 10
inherit
143112
0
May 29, 2010 13:09:41 GMT -8
ialex
10
July 2009
ialex
|
Post by ialex on Aug 16, 2007 15:51:29 GMT -8
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. <script type="text/javascript"> <!--
/*Colour Palette Square Picker - By iAlex - Open Source*/ if(document.postForm && document.postForm.color){ var iColor=document.postForm.color var iParent=iColor.parentNode.parentNode.parentNode; var iColorTr=iParent.cloneNode(true); iColorTr.childNodes[0].firstChild.innerHTML='Add Colors:'; iParent.parentNode.insertBefore(iColorTr, iParent.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>
|
|