Go Back   CodingForums.com > :: Client side development > JavaScript programming > Post a JavaScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rating: Thread Rating: 6 votes, 2.50 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-17-2003, 01:37 AM   PM User | #1
stunix
Registered User

 
Join Date: Aug 2003
Location: Wales
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
stunix is an unknown quantity at this point
color style previewer (tool)

I really liked that colour styler, mind if i play with it? here is one i did earlier:

note the entry and output of html buttons, it only works on ie and im not sure abot mac, but it works on wine ie.
(lets face it stu, its buggy and might not work at all!!)

anyway, have a look, see if it helps!
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

its attached to this message somewhere in a zip file
Attached Files
File Type: zip stunix_style_editor_ieonly.zip (6.5 KB, 244 views)
stunix is offline   Reply With Quote
Old 08-17-2003, 03:00 AM   PM User | #2
MotherNatrsSon
Senior Coder

 
Join Date: Mar 2003
Location: OHIO
Posts: 1,438
Thanks: 1
Thanked 0 Times in 0 Posts
MotherNatrsSon is an unknown quantity at this point
It did not work in IE 5.1.7 on my Mac. It throws an error .. function expected.....in the very last part of the page. line 245 I believe it was.

MNS
__________________
[size=1]"If you want to be "in the biz" you are going to have to roll with the changes or get out, basically."
MotherNatrsSon is offline   Reply With Quote
Old 08-19-2003, 09:06 AM   PM User | #3
stunix
Registered User

 
Join Date: Aug 2003
Location: Wales
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
stunix is an unknown quantity at this point
colour selection box

im sorry, i guessed it wouldnt work on a mac, i have found out the hard way that IE for the mac is possibly the most fickle of all the browsers, i assure you it works on a pc.

on the same subject, i wrote this to be used in conjunction with automating the build of style sheets by a non coding user,

a simple selection box with all of the named colours and the majority of hex. handy for quick reference.



<xmp>
function doclr(){
boc = new Array ('AliceBlue','AntiqueWhite','Aqua','Aquamarine','Azure','Beige',
'Bisque','Black','BlanchedAlmond','Blue','BlueViolet','Brown','BurlyWood',
'CadetBlue','Chartreuse','Chocolate','Coral','CornflowerBlue','Cornsilk',
'Crimson','Cyan','DarkBlue','DarkCyan','DarkGoldenRod','DarkGray','DarkGreen',
'DarkKhaki','DarkMagenta','DarkOliveGreen','Darkorange','DarkOrchid','DarkRed',
'DarkSalmon','DarkSeaGreen','DarkSlateBlue','DarkSlateGray','DarkTurquoise',
'DarkViolet','DeepPink','DeepSkyBlue','DimGray','DodgerBlue','FireBrick',
'FloralWhite','ForestGreen','Fuchsia','Gainsboro','GhostWhite','Gold',
'GoldenRod','Gray','Green','GreenYellow','HoneyDew','HotPink','IndianRed',
'Indigo','Ivory','Khaki','Lavender','LavenderBlush','LawnGreen','LemonChiffon',
'LightBlue','LightCoral','LightCyan','LightGoldenRodYellow','LightGrey',
'LightGreen','LightPink','LightSalmon','LightSeaGreen','LightSkyBlue',
'LightSlateGray','LightSteelBlue','LightYellow','Lime','LimeGreen','Linen',
'Magenta','Maroon','MediumAquaMarine','MediumBlue','MediumOrchid',
'MediumPurple','MediumSeaGreen','MediumSlateBlue','MediumSpringGreen',
'MediumTurquoise','MediumVioletRed','MidnightBlue','MintCream','MistyRose',
'Moccasin','NavajoWhite','Navy','OldLace','Olive','OliveDrab','Orange',
'OrangeRed','Orchid','PaleGoldenRod','PaleGreen','PaleTurquoise','PaleVioletRed',
'PapayaWhip','PeachPuff','Peru','Pink','Plum','PowderBlue','Purple','Red',
'RosyBrown','RoyalBlue','SaddleBrown','Salmon','SandyBrown','SeaGreen','SeaShell',
'Sienna','Silver','SkyBlue','SlateBlue','SlateGray','Snow','SpringGreen',
'SteelBlue','Tan','Teal','Thistle','Tomato','Turquoise','Violet','Wheat',
'White','WhiteSmoke','Yellow','YellowGreen');
clr=new Array('00','22','44','66','88','aa','cc','ee','ff');out = '<select>';
for(i=0;i<clr.length;i++){for(j=0;j<clr.length;j++){for(k=0;k < clr.length;k++){
out+='<option style="background-color:#'+clr[i]+clr[j]+clr[k]+';color:#'+clr[7-i]
out+=clr[7-j]+clr[7-k]+'">#'+clr[i]+clr[j]+clr[k];}}}for (i=0;i<boc.length;i++)
{out+='<option style="background-color:'+boc[i]+';color:black">'+boc[i]}
out+='</select>';return out}

document.write(doclr())
</xmp>

Last edited by stunix; 08-19-2003 at 03:38 PM..
stunix is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:54 AM.


Advertisement
Log in to turn off these ads.