I am new to jquery, and there seems like it has some limits on passing values.
Code fragment from child window that has an onclick attached to the tr.
if ($powners_Row = $db->fetch($powners_Res))
$kount = 0;
$kount = $kount + 1;
$rowid = "a".$kount;
$vid = $powners_Row['ownerid'];
'<tr id='.$rowid.' onMouseover=this.bgColor="lightgrey" onMouseout=this.bgColor="#FFFFFF" onclick="cell(this.id)">'.
while ($powners_Row = $db->fetch($powners_Res));
Now the function that handles this:
opener.document.peditform.ownerid.value = x.firstChild.nodeValue;
opener.document.peditform.petowner.value = x[1.firstChild.nodeValue;
opener.document.peditform.ostreet.value = x.firstChild.nodeValue;
This code works perfect.
OK, the questions.
1) How to add a onclick to a <tr> in jquery? Note each row has unique id.
2) How to send the three values obtained back to parent?
I don't use this technique now, I used to, I now return the ownerid from the table row, then do a lookup through ajax to get the rest of the data. Much like dhtmlgoodies.com's dynamic client lookup example. I also use the SACK library.
For Dynamic client lookup on left click ajax scripts, then scroll down.