Hello All...
Thanks in advance for your help...
Here is my problem I am opening a popup window like this:
<input type="submit" onclick="additem('additems.php?sid=<? echo $sid ?>&orderid=<? echo $orderid ?>')" value="Add Item(s)">
This opens the window perfectly however I need to be able to click a button in the popup sending back to the parent window data. Then once the data is received add information to the db...
Popup Example:
<tr bgcolor="#eeeeee">
<td align="center"><? echo $a[item_name]; ?></td>
<td align="center"><? echo $a[part_number]; ?></td>
<td align="center"><? echo $a[shortdesc]; ?></td>
<td align="center"><input type="text" size="2" name="qty" value="1"></td>
<td align="center"><input type="text" size="8" name="price" value="<? echo $a2[price] ?>"></td>
<td align="center"><input type="submit" name="additem" value="Add Item"></td>
</tr>
Parent Example:
if($additem) {
Blah Blah Blah
}
Here is a bit of code I have seen and it may work but I need help understanding it. I am not a javascript pro 🙂
Example:
<INPUT TYPE="BUTTON" VALUE="Add Item"
ONCLICK="window.opener.invoice.add_itemID.value='<? echo $a[IDitem]; ?>';
window.opener.invoice.add_name.value='<? echo ereg_replace("\"","",$a[name]); echo ereg_replace("\"","",$a[short_description]); echo ereg_replace("\"","",$a[store_part_num]); ?>';
window.opener.invoice.add_qty.value=this.form.aqty.value;
window.opener.invoice.add_unitprice.value=this.form.uprice.value;
window.opener.invoice.submit(); ">
THANKS JARED