Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
That hides or shows an element based off of its ID and current display property. :P


var colors = [0,3,6,9,"C","F"];
for(a=0;a<colors.length;a++){
if(a==0)
document.write("<table><tr><td>");
for(b=0;b<colors.length;b++){
if(b==0)
document.write("<table cellpadding='4' cellspacing='0'>");
for(c=0;c<colors.length;c++)
document.write((c==0?"<tr>":"")+"<td style='background-color: #"+colors[a]+colors[a]+colors[b]+colors[b]+colors[c]+colors[c]+";' id='#"+colors[a]+colors[a]+colors[b]+colors[b]+colors[c]+colors[c]+"' onclick='alert(this.id);'></td>"+(c==colors.length-1?"</tr>":""));
if(b==colors.length-1)
document.write("</table>");
}
if(a==colors.length/3)
document.write("</td><td>");
if(a==colors.length-1)
document.write("</td></tr></table>");
}


Nate

Nate Avatar

**
Official Member

85


July 2007
Pretty sweet :P

Javascript. Has a whole bunch of colors pasted like SSD's old thing. Onclick alerts the Hex. Very nice.


//CD's code XP
var names = ['CD','Crazy_J','Peter','Moose','HP_Mad'];
names.splice(2,3);
for(x=0;x<names.length;x++){
document.write(names[x]);
}


I was to lazy so i stole some of CD's code.


Last Edit: Apr 5, 2006 23:08:15 GMT by Nate

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Pretty close. Its pretty much a completely duplicate of PB's color picker coded by Peter, except that his uses objects, and enters into the form. :P Mine just alert's the value.

Your's should output
CD Crazy_J HP_Mad


I can't really remember how splice works. :P But its JS


Last Edit: Apr 5, 2006 23:15:27 GMT by Chris

newBookmarkLockedFalling