Assalam-o-laikum Sathio main ny PHP mai aik colors chart banaya hai umeed hai color chart tu aapko zror pasand aiega....
Mere s Charts ki tamam credit mere muazez ustad SHAKEEL ko jati hai jes say mai ny PHP seekha (Taham mai ny kam seekha hai par seekha tu unhe sy hai)...
Mere s torde se koshesh k baary mai please zror comments deen (Khaas kar PHP exports)...
PHP Code:
<html>
<head>
<title>Colors Chart by Kashif Ahmad (LoveRahiPlus)</title>
<script>
//Creat Function that apply/change selected/choosed color...
function SelectColor(thisClr, chooseIt){
/***********************************************************************
if the color select from color chart(giving) the value will return 1 and
the clicked/choosed color will change successfully. Otherwise Color will
not change.
************************************************************************/
if (chooseIt==1){
//Apply selected/choosed color to the place to be colored.
Chosed_Color.innerHTML= "<center><i>New<br />color<br />"
+thisClr+"<br />changed<br />successfully.</i></center>"
}
}
</script>
<?php
//starting from the table
echo "<table border='0.05pt'>";
//All Colors codes/numbers in hexadecimal format is arraied.
$num = Array ("00", "11", "22", "33", "44", "55", "66", "77", "88", "99", "AA", "BB", "CC", "DD", "EE", "FF");
for($i = 0; $i <= 15; $i+=3){
/******************************************************************
Start another line after completing 1st loop ($i, $j, $y);
$i used for 1st 2 digits, $j for middle ones while $ used
for last 2 digits (eg $i=FF, $j=00 & $y=DD ==> #FF00DD)
******************************************************************/
echo "<tr>";
for($j = 0; $j <= 15; $j+=3) {
for($y = 0; $y <= 15; $y+=3){
//Collect all loops as a color code
$chClr = "#".$num[$i].$num[$j].$num[$y];
//Show all colors as a chart.
echo "<a href='javascript:SelectColor(\"$chClr\", 1)'>
<td width=10 height=10 bgColor=".$chClr.">
</td></a>";
}
}
echo "</tr>";
}
echo "</table><br />";
?>
</head>
<body>
Selected Color is :
<div style=
"width:100px; Height:100px;background-color=red"
id=Chosed_Color>
</div>
</body>
</html>
Mere Codes mai chaahta hoon k Choosed_Color k rang bhe same osi traah hoo jo mai ny select kia ho....mai ny tu bahot koshesh ki par nakaam raha...Please export help me....
How can i change the color of Chosed_Color (DIV) background color to the selected one?
Aap ka Shukria
Kashif Ahmad
(LoveRahiPlus)
Bookmarks