#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,323
January 2004
todge
|
Post by Todge on Jul 18, 2006 8:38:51 GMT -8
This will put a color drop-down menu in the Quick Reply box...
Put it in your Global Footer..
<script type="text/javascript"> <!-- /* Color drop-down in quick reply by Todge Copyright © 2006 Please keep this header intact */
if(location.href.match('action=display')) { function aC(col) { if(col == '') { return; } var tA = document.getElementsByTagName('textarea'); for(ta=0; ta<tA.length; ta++) { if(tA[ta].name == 'message') { tA[ta].value += '[color='+col+'][/color]'; return; }} return; }
var QR = document.getElementsByTagName('form'); for(t=QR.length-1; t>-1; t--) { if(QR[t].method == 'post') { var colors = new Array('Black','Red','Yellow','Pink','Green','Orange','Purple','Blue','Beige','Brown','Teal','Navy','Maroon','Lime Green')
var drop = '<select name="color" onChange="aC(this.options[this.selectedIndex].value)"><option value="">Colors</option>'; for(c=0; c<colors.length-1; c++) { drop += '<option value="'+colors[c]+'">'+colors[c]+'</option>'; } drop += '</select>';
var qr = QR[t].parentNode.innerHTML.split(/<br/i); qr[0] += ' '+drop; QR[t].parentNode.innerHTML = qr.join('<br'); break; }}} // --> </script>
Note: It will only put the tags in the text box, you cannot hilite text and wrap it in the UBBC tags with this code..
|
|