Textbox problem with onclick @
<p>I'm just trying to display a table in client side from database as a distinct value from every column. Here i have fetched the value by using "select distinct ...." code and put this value in a single textbox </p>

<p>here is the code...</p>

<pre><code>   &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
    &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
    &lt;title&gt;Untitled Document&lt;/title&gt;


&lt;script type="text/javascript"&gt;
function onClick()
 {
   alert(document.form.thirdparty.value);

  }
&lt;/script&gt;




&lt;/head&gt;

&lt;body&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;form name="form" method="get" &gt;

 &lt;?php 
$con=mysql_connect('localhost','root','');
mysql_select_db('database',$con);
$res = mysql_query("SELECT count(*) as count FROM tablename") or die(mysql_error());
while ($row = mysql_fetch_array($res)) {
$val=$row['count'];

} ?&gt; 


 &lt;input name="fino" type="text" id="fino" size="5" value="&lt;?php echo $val." docs" ?&gt;" style="border-style:hidden; color:#0083fa;" /&gt;


&lt;table width="1474" height="270" border="0" &gt;
  &lt;tr&gt;
    &lt;td width="180" height="41"&gt;




          &lt;input name="Item" type="DocumentType" id="textfield5" value="        Item"size="30" /&gt;    &lt;/td&gt;
    &lt;td width="180" height="41"&gt;


         &lt;label&gt;
    &lt;td width="180" height="41"&gt;    &lt;input type="text" name="textfield8" id="textfield8" style="visibility:hidden" /&gt;&lt;/td&gt;
        &lt;/label&gt;


      &lt;label&gt;
       &lt;td width="180" height="41"&gt; &lt;input type="text" name="textfield9" id="textfield9" style="visibility:hidden"/&gt;&lt;/td&gt;
        &lt;/label&gt;





    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
     &lt;td&gt;

&lt;?php
$a=mysql_query("select distinct language from tablename");
$c=0;
$i=1;
$x=1;
while($row = mysql_fetch_array($a))
{
$b=$row['language'];
$i=$b;
$d=mysql_query("select count(*) as count from tablename where language='$i' ");
while ($row = mysql_fetch_array($d)) {
$e=$row['count'];
$cal=round(($e/$val)*100);


}
?&gt;


 //in this textbox am using onclick function

      &lt;input type="text"  size="30" style="height:&lt;?php echo $cal.px?&gt;"value="&lt;?php echo "$i"."&amp;nbsp;"."&amp;nbsp;"."&amp;nbsp;"."$e"." docs" ?&gt;"name="language" id="textfield"onClick="onClick();" /&gt;

      &lt;?php 
$i++;
$c++;
}
?&gt; &lt;/td&gt;
&lt;td&gt; 
&lt;?php 
$con=mysql_connect('localhost','root','');
mysql_select_db('database',$con);
$a1=mysql_query("select distinct Subject from tablename");
$c1=0;
$i1=1;
while($row = mysql_fetch_array($a1))
{
$b1=$row['Subject'];
$i1=$b1;
$d1=mysql_query("select count(*) as count from tablename where Subject='$i1' ");
while ($row = mysql_fetch_array($d1)) {
$e1=$row['count'];
$cal1=round(($e1/$val)*100);
}
?&gt;



        &lt;input type="text" size="30" style="height:&lt;?php echo $cal1.px?&gt;" value="&lt;?php echo "$i1"."&amp;nbsp;"."&amp;nbsp;"."&amp;nbsp;"."$e1"." docs" ?&gt;"name="item" id="textfield2" /&gt;
 &lt;?php 
$i++;
$c++;
}
?&gt;    &lt;/td&gt;
    &lt;td&gt;


      &lt;label&gt;
       &lt;td&gt; &lt;input type="text" name="textfield12" id="textfield12" style="visibility:hidden" /&gt;&lt;/td&gt;
        &lt;/label&gt;

      &lt;label&gt;
       &lt;td&gt; &lt;input type="text" name="textfield13" id="textfield13" style="visibility:hidden" /&gt;&lt;/td&gt;
        &lt;/label&gt;

      &lt;label&gt;
       &lt;td&gt; &lt;input type="text" name="textfield14" id="textfield14" style="visibility:hidden" /&gt;&lt;/td&gt;
        &lt;/label&gt;


      &lt;label&gt;
       &lt;td&gt; &lt;input type="text" name="textfield15" id="textfield15" style="visibility:hidden" /&gt; &lt;/td&gt;
        &lt;/label&gt;
    &lt;/form&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;

  &lt;blockquote&gt;
   &lt;p align="center"&gt;&amp;nbsp;&lt;/p&gt;
 &lt;/blockquote&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
