Questions Tags Users Unanswered

Color Palette

Question is open.
1 answer (2 voices) (4475 views)
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.

<script type="text/javascript">
function getColor1() { alert("hai");
      var img = document.createElement("img");
      img.src = "img/palette.gif"; 
      //img.height = 75; 
      //img.width = 113;
      //img.style.top=800;
      //img.style.right=100;
      document.body.appendChild(img);
    //getColor();
    }
function getColor(block)
{alert("hai1");
var s_url=block.href;
var pColor=s_url.substr(s_url.indexOf("#"));
document.getElementById("colorPalDemo").style.fontColor=pColor;
//getColor1();
}

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.

<form accept-charset="utf-8" action="b.html" method="post" name="fillup" enctype="multipart/form-data" onSubmit="return validate();">
<table align="center" border="1" width="850" height="500" bgcolor="FFF5EE" >
<tr><td>
    <table align="center" bgcolor="">
        <tr><td align="center" colspan="10"><img src="img/laugh.gif" alt="Smiley" /></td></tr>
        <tr><td align="center" style="color:#FF0000; text-decoration:blink;" colspan="10" ><b><?php echo $qtype1;?></b></td></tr>
        <tr><td colspan="10">&nbsp;</td></tr>
        <tr><td align="center" colspan="10"><img src="img/subst.png" title="substring" onclick="formatText ([ques1,ques2,opt1,opt2,opt3,opt4],'sub');">
        <img src="img/supst.png" title="superstring" onclick="formatText1 ([ques1,ques2,opt1,opt2,opt3,opt4],'sup');">
    <!--<input type="button" value="Font" onclick="font ([ques1,ques2,opt1,opt2,opt3,opt4],'font');">-->
    
        <img src="img/mover.png" title="mover,mout" onclick="mover ([ques1,ques2,opt1,opt2,opt3,opt4],'mover','mout');"></td></tr>
<!--<input type="button" value="Bold" onclick="bold([ques1,ques2,opt1,opt2,opt3,opt4],'B');">-->
        <!--<tr >
            <td>
            Question No
            </td>
            <td>
            :
            </td>
            <td>&nbsp;
            
            </td>
            <td align="left">
            <input type="text" name="qno" id="qno" readonly="" style="background-color:#FFFFFF;" size="10" value="<?php echo $qno;  ?>"/>
            </td>
        </tr>-->
<img  src="img/palette.gif" usemap="#color_pallete" />
<map name="color_pallete" id="color_pallete">
    <area shape="rect" coords="7,7,31,30" href="#FF0000" onclick="getColor(this);" />
    <area shape="rect" coords="35,7,59,30" href="#00FF00" onclick="getColor(this);" />
    <area shape="rect" coords="63,7,87,31" href="#0000FF"  onclick="getColor(this);" />
    <area shape="rect" coords="92,7,115,31" href="#8B008B" onclick="getColor(this);" />
    <area shape="rect" coords="7,33,30,58" href="#00FFFF"  onclick="getColor(this);"/>
    <area shape="rect" coords="36,34,59,57" href="#006400" onclick="getColor(this);" />
    <area shape="rect" coords="63,34,86,58" href="#6B8E23" onclick="getColor(this);" />
    <area shape="rect" coords="92,35,115,57" href="#00FF7F" onclick="getColor(this);" />
    <area shape="rect" coords="8,61,31,85" href="#32CD32"  onclick="getColor(this);" />
    <area shape="rect" coords="35,62,59,85" href="#7FFFD4" onclick="getColor(this);" />
    <area shape="rect" coords="64,61,86,85" href="#7FFF00" onclick="getColor(this);" />
    <area shape="rect" coords="92,61,115,85" href="#008B8B"  onclick="getColor(this);" />
    <area shape="rect" coords="91,88,115,111" href="#9932CC" onclick="getColor(this);" />
    <area shape="rect" coords="64,88,87,111" href="#00BFFF" onclick="getColor(this);" />
    <area shape="rect" coords="36,88,59,112" href="#1E90FF" onclick="getColor(this);" />
    <area shape="rect" coords="8,88,30,111" href="#FF4500" onclick="getColor(this);" />
   </map>
<span id="colorPalDemo"></span> 
Font size:
<select name="sizeselect" id="ss" onchange="changeSize(this.value)">
 <option value="10">10</option>
 <option value="13">13</option>
 <option value="15">15</option>
 <option value="17">17</option>
 <option value="19">19</option>
 <option value="21">21</option>
 <option value="23">23</option>
 <option value="50">50</option>
</select>
<input type="button" value="Font" onclick="font ([ques1,ques2,opt1,opt2,opt3,opt4],'font',document.getElementById('ss').value,document.getElementById('aa').value,document.getElementById('colorPalDemo').style.fontColor);">
<select name="selectFontFamily" id="aa" onchange="updateh1family(this.value)">
    <option value="Serif">Serif</option>
    <option value="Arial">Arial</option>
    <option value="Sans-Serif">Sans-Serif</option>
    <option value="Tahoma">Tahoma</option>
    <option value="Verdana">Verdana</option>
    <option value="Lucida Sans Unicode">Lucida Sans Unicode</option>    
    <option value="Times New Roman">Times New Roman</option>


<td>
            Statement1<font color="#0000FF">*</font>
            </td>
            <td>
            :
            </td>
            
            <td><textarea name="ques1" id="ques1" cols="25" rows="5" style="width: 220px; height: 100px;"></textarea>
            </td>

The above is my code. It doesn't works. I don't know why. Please help me.
1 Answer
15 30 50 per page

Your Answer

Limit of files to attach: 3 / Max total size: 1024 KB
File:
Description:
remove