#native_company# #native_desc#
#native_cta#

Getting Text Area With Click Of a Button

By prasad reddy
on December 14, 2004


 <script language="JavaScript">
<!--
var count = true;
  function drop(x)
{  
  if(count == true)
  {
  var y;
  y=x;

    setLyr(document.getElementById(y),document.getElementById('permanent'))
        document.getElementById('permanent').style.display = "block";
        count=false;
  }
  else
  {
    document.getElementById('permanent').style.display = "none"; 
    //document.forms[0].testcity.style.visibility='visible';
    //document.forms[0].educationtype.style.visibility='visible';
    count=true;
  }
}

 function findPosX(obj)
{
  var curleft = 0;
  if (obj.offsetParent)
  {
    while (obj.offsetParent)
    {
      curleft += obj.offsetLeft
      obj = obj.offsetParent;
    }
  }
  else if (obj.x)
    curleft += obj.x;
  return curleft;
}

function findPosY(obj)
{
  var curtop = 0;
  if (obj.offsetParent)
  {
    while (obj.offsetParent)
    {
      curtop += obj.offsetTop
      obj = obj.offsetParent;
    }
  }
  else if (obj.y)
    curtop += obj.y;
  return curtop

   }

  function setLyr(obj,lyr)
{
  var newX = findPosX(obj);
  //alert(newX);

  var newY = findPosY(obj);
    //alert(newY);
  if (lyr == 'testP') newY -= 50;
  var x = lyr;
  x.style.top = newY+9+ 'px';
  x.style.left = newX+25+'px';
}



-->
</script>
   <table>
  <tr>
<td height="38" colspan=4 valign="top">

  <img name="permanentbutton" src="permanenticon.gif"  onclick="javascript:drop(this.name);" style="cursor:hand">

 </td></tr>
 <tr>
  <td height="38" colspan=4 valign="top">

  <img name="permanentbutton1" src="permanenticon.gif"  onclick="javascript:drop(this.name);" style="cursor:hand">

 </td></tr><tr>
 <td height="38" colspan=4 valign="top">

  <img name="permanentbutton2" src="permanenticon.gif"  onclick="javascript:drop(this.name);" style="cursor:hand">

 </td></tr><tr>
 <td height="38" colspan=4 valign="top">

  <img name="permanentbutton3" src="permanenticon.gif"  onclick="javascript:drop(this.name);" style="cursor:hand">

 </td></tr><tr>
 <td height="38" colspan=4 valign="top">

  <img name="permanentbutton4" src="permanenticon.gif"  onclick="javascript:drop(this.name);" style="cursor:hand">

 </td> </tr><tr>

   </table>

<font class="red">&nbsp;&nbsp;&nbsp;<font class="databold">&laquo;</font> Click to fill Comments</font></td>
<div id="permanent" style="DISPLAY:none;position:absolute;left:10;top:52;background-color:silver;z-index:1">
<table class="tableborder">
<td class="wdatabold" width="40">Comments</td>
<td ><textarea cols=50 rows=7 NAME="atremarks"   onchange="copycontent(this);"></textarea></td>
</tr>
  <tr>
<td colspan=4 valign="top" align='center'><img name="permanentclosebutton" src="close.gif"  onclick="javascript:drop();" style="cursor:hand" tabindex='21'></td>
  </tr>
</table>
</div>