In parent page i have table with dynamic adding row and each row have text box and button to open pop up window.
After pop up window open there are some checkboxes and when user select of them the value will be send to text box in parent page.
this is my parent page code:
<html>
<head>
<script>
var x=1;
function addRow(tableID){
var table=document.getElementById(tableID);
var rowCount=table.rows.length;
var row=table.insertRow(rowCount);
var colCount=table.rows[1].cells.length;
var cell1=row.insertCell(0);
var c2= document.createElement('input');
c2.type = 'text';
c2.name = 'rowinfo' + x;
c2.id = 'rowinfo' + x;
c2.setAttribute("class","textborder")
cell1.appendChild(c2);
var cell2=row.insertCell(1);
var c4= document.createElement('select');
c4.name = 'CLO_Sel' + x;
c4.id = 'CLO_Sel' + x;
cell2.appendChild(c4);
var cell3=row.insertCell(2);
var c3= document.createElement('select');
c3.name = 'Syll_PLO' + x;
c3.id = 'Syll_PLO' + x;
var c5= document.createElement('input');
c5.type='button';
c5.value='PLO';
c5.onclick= function pop()
{
window.open('pop.php', 'popup', 'width=420,height=540,resizeable=no');
document.login.setAttribute('target', 'popup');
document.login.setAttribute('onsubmit', '');
document.login.submit();
};
cell3.appendChild(c3);
cell3.appendChild(c5);
var cell4=row.insertCell(3);
var c6= document.createElement('input');
c6.type = 'number';
c6.name = 'Syll_week' + x;
c6.id = 'Syll_week' + x;
c6.setAttribute("class","textbordersmall2")
cell4.appendChild(c6);
x++;
document.getElementById("v").value=x;
}
</script>
</head>
<body>
<TABLE ID="tbl" width="570" border="1" cellspacing="0" cellpadding="0" align="center" class="st">
<TH WIDTH="400">Content</TH><TH WIDTH="57">CLO</TH><TH WIDTH="57">PLO</TH><TH WIDTH="56">Week</TH>
<tbody>
<tr>
<td> <INPUT name="rowinfo0" id="rowinfo0" TYPE="text" SIZE="255" MAXLENGTH="255" class="textborder"></td>
<td> <select name="CLO_Sel0" id="CLO_Sel0" ><option>1</option></select></td>
<td> <textarea class="txtarea" name="Syll_PLO0" id="Syll_PLO0"cols="4" rows="1"/>