2011-01-31 26 views
1

子ウィンドウから親ウィンドウに複数のレコードを追加する方法?私たちは親ウィンドウに記録し、また、ページのリフレッシュなしで親ウィンドウを更新し、子ウィンドウのパスから複数のレコードを選択すると は後藤そして...そのリンクを使用して、そこからの請求書を追加複数のレコードを子ウィンドウから親ウィンドウに動的に転送する

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

....手段】製品を追加する1つのウィンドウがポップアップしますが、同じ機能が必要ですが、どこから始めるべきか分かりません。

+1

あなたは親ウィンドウに*シングル*データベースレコードを渡す方法はありますか? – Gabe

+0

詳細情報とコードsnipetを追加してください。 – Mauricio

答えて

0

親ウィンドウでjquery関数を作成するには、まず子ウィンドウからの応答があるhtml domを使用します。リストについては、子ウィンドウのコードデータで今すぐ

や関数を作成し、同じの子プロセスから親ウィンドウ関数を呼び出します。

サンプルは、以下のようにここから

Htmlの

<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"/> 

親ウィンドウのオープン子ウィンドウです。

子ページのコードは、上記のコードで

 

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; 
    } 
 

uは親ウィンドウに追加する必要があるレコードを選択し、チェックボックスやPHPのコードを追加し、以下のとおりです。 あなたが望む結果が得られるでしょう。

乾杯。

+0

yahはうまく動作します。助けてください。 –

関連する問題