pass the data of dynamic text box to text area simultaneously
<p>------Php file---------</p>

<pre><code>&lt;html&gt;
    &lt;head&gt;
        &lt;style type="text/css"&gt;
            .small_input { width: 35px; }
        &lt;/style&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;?php echo $html; ?&gt;
        &lt;script  type="text/javascript" src="ddp_index.js"&gt;&lt;/script&gt;
    &lt;/body&gt;
&lt;/html&gt;
&lt;?php
$username = "root";
$password = "welcome123";
$database = "solaron_ddp";
$host = "localhost";

mysql_connect($host,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

$html ="&lt;script  type=\"text/javascript\" src=\"ddp_index.js\"&gt;
        &lt;/script&gt;";

$html .="Data Point/Value : ";
$html .="&lt;select name =\"datapoints\" id=\"datapoint\" onchange=\"ddpAddDataPoint(this); return false;\"&gt;";

$query = "SELECT datapoint_name, datapoint_id FROM datapoints";
$result = mysql_query($query);

$html .="&lt;option&gt;-- Select --&lt;/option&gt;";

while($row = mysql_fetch_array($result)) {
    $html .= "&lt;option value=\"".$row[1]."\"&gt;". $row[0]."&lt;/option&gt;";
}

$html .= "&lt;/select&gt;";


&lt;!--four input box are creating inside this div--!&gt;
$html .= "&lt;div id=\"variable_container\" &gt;&lt;/div&gt;";

$html .= "&lt;input type=\"hidden\" value=\"0\" id=\"no_variables\"/&gt;";
$html .= "&lt;input type=\"hidden\" value=\",\" id=\"selected_variables\"/&gt;";

$html .= "&lt;div id=\"text_formula\"&gt;";
$html .= "&lt;input size=\"4px\" type=\"text\" value=\" \" id=\"frml_name\"/&gt;";
$html .= "&lt;textarea type=\"textarea\" value=\" \" id=\"frml_text\"&gt;&lt;/textarea&gt;&lt;/div&gt;";

//$html .= "&lt;input type=\"text\" value=\"\" id=\"text\" name=\"text\"/&gt;";

//echo $html;

?&gt;
</code></pre>

<p>-----------javascript file-----------</p>

<pre><code>function ddpAddDataPoint (obj) {
    if ( obj.selectedIndex == 0 )
        return true;

    var selected_value = obj.value;
    var selected_name = obj.options[obj.selectedIndex].innerHTML;

    ddpAddField ( selected_value, selected_name );

    obj.selectedIndex = 0;

    return true;

}

function ddpAddField ( id, lable ) {
    var existing_vars = document.getElementById('selected_variables');

    if ( existing_vars.value.search(','+id+',') != -1 )
        return false;
    existing_vars.value = existing_vars.value + id + ',';

    var parent = document.getElementById('variable_container');
    if ( ! parent ) alert('Cannot find variable_container');

    var div, input_text, input_hidden;
// creating div
    div = document.createElement('div');
//dynamic input box inside the div
    input_text = document.createElement('input');
    input_text.className = 'small_input';

    input_hidden = document.createElement('input');
    input_hidden.type = 'hidden';
    input_hidden.value = id;

    div.appendChild(input_text);
    div.appendChild(document.createTextNode(lable));
    div.appendChild(input_hidden);
    parent.appendChild(div);
    return true;


}
</code></pre>

<hr>

<p>My question - Here i am creating four dynamic "input box" and one "text area" using php and javascript. If i enter some data that data should display in "text area" simultaneously, and 
i wann use that "text area" as a formula means I can enter operator and brackets. But, one thing is I dont have any ID for that dynamic text box.
I am not getting what to do and how to do?
Please help me, I have stuck here since four days</p>
