开发者

Pass More that one database record from child window to parent window dynamically

How to add multiple record from child window to the parent window.? Means when we select multiple records from child window pass that records to parent window and also update parent window without page ref开发者_运维技巧resh....

http://demo.vtiger.com/index.php?module=Invoice&action=EditView&return_action=DetailView&parenttab=Sales

use that link and add invoice from there...then goto add products one window will popup i want same functionality but dont have idea where to start


First of all create jquery function in parent window with some html dom in which response from child window can be placed on.

Now in child window code data for listing and create function and call parent window function from child and process for the same.

sample is as below,

Html for Parent window

<input type ="text" name="customername" id="customername" />
<input type ="text" name="customeraddress" id="customeraddress" />
<input type ="text" name="customertown" id="customertown"/>
<input type ="text" name="customercountry" id="customercountry"/>

open child window from here.

Child page code is as below,


function post_value(cname,caddress,ctown,ccount,cpincode,id)
    {
        window.opener.document.getElementById('customername').value = cname;
        window.opener.document.getElementById('customeraddress').value = caddress;
        window.opener.document.getElementById('customertown').value = ctown;
        window.opener.document.getElementById('customercountry').value = ccount;
        self.close();
        window.close();
        return false;
    }

In above code add checkbox and php code to select record which u need to add in parent window. Now see the result you will have what you wanted.

Cheers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜