This topic is locked

How to pass master key to the detail page when detail page in modal popup window?

2/7/2014 1:45:13 PM
PHPRunner General questions
A
Abul author

Sorry guys! I have posted lot of wired problems to be solved. Again another one. Please help me out. I appreciate your help.
In normal situation when we add detail_add.php page on master_add.php page then the detail_add.php page shows as "Inline Add" form under the master form or within the Tab on master_add.php page, which is not acceptable for bigger size detail table. So it's better to open detail_add.php page in a modal popup window on master_add.php page by clicking button or link. We can create model popup window for detail_add.php page by following famous tip here.
But the problem is that, the master record key for current record on master_add.php page which is not yet saved into database doesn't pass into the popup modal detail form as it does in case traditional master-detail related page through "Inline Add" method. So detail form data are saved into detail table as orphan record without master key in case of modal popup. How can I solve this. Thanks again.