2016-03-30 1586 views
0

私のページの横にIframeがあります。その下にはJavaScriptがあります。私のページ内のiframe JavaScript関数の呼び出し方法

function getTotSeats(){ 
    window.WebAppInterface.showToast(document.forms[0].txtSeat_no.value); 
    return document.forms[0].txtSeat_no.value; 
} 

私のページで上記のjavascipt関数を呼び出す必要があります。

マイページは

<iframe name="select_frame" sandbox="allow-same-origin allow-scripts allow-popups allow-forms" id="iframe_id" src="http://202.65.147.152:8080/tgtdc/etg/seatLayoutReservation.jsp?upDown=UP&toCityCode=100&serviceCode=34&totSeats=2&vehicle=HITECH%20-%20AC&toDate=31-08-2015&FR=F" width=100% style="z-index:10000" height="480" frameborder="0" scrolling="no" style="border:none;"></iframe> 
<input type='button' name='save' value='SAVE' id="save_id" style="height:30px;width:100px;"> 
<script> 

    $('#save_id').click(function() { 
    var el = document.getElementById('iframe_id'); 

    var result=getIframeWindow(el).getTotSeats(); 
    alert(result); 

}); 

あるしかし、私はvalue.Canはあなたがすべてのボディが私を助けてくださいということですか私は私のpage.How内のiframe関数値を取得しておりません。

+1

のiframeのドメイン( 'ます。http://202.65.147.152:8080 /には、')あれば、あなたはそれが原因のセキュリティ機能へのコンテンツのアクセスすることはできません親ウィンドウのものと異なっていますブラウザ。 –

+0

はい 'http://202.65.147.152:8080/'は別のサーバーです。私はそこで働いていますserver.But私はその値を使用する必要があります。それは不可能ですか? – sucharitha

答えて

関連する問題