2012-02-15 3 views
0

私は私の主な質問を台無しにしたので、ここで私は再び行く。レスポンス後のiframeをリリースする.rediectパート2

私はmainrecord.htmlに、iframeを使用して2つのhtmlを表示します。一番上のhtmlページには保存ボタンがあります。この保存ボタンは、一部のデータを処理し、別のhtmlに移動します。問題は下部iframeがまだそこにあることです。ここで私はmainrecord.htmlに持っているものです:のtop.htmlで

<iframe scrolling="no" noresize target="middle" src="<%=JustPath(oProp.ScriptPath)+[/top.html?id=]+tmpid"%> name="top" height="62%" class="auto-style1" style="width: 100%">You need a Frames Capable browser to view this content.</iframe> 
<iframe scrolling="no" noresize target="middle" src="<%=JustPath(oProp.ScriptPath)+[/lower.html?id=]+tmpid"%> name="lower" style="width: 100%; height: 35%">You need a Frames Capable browser to view this content.</iframe> 
<script type = "text/javascript" > 
element = document.getElementById("lower"); 
</script> 

saverecord.htmlに行く保存ボタンがあります。私はいくつかのデータ作業を行い、次にこれを行います:

viewrecords.htmlが正しく表示されます。しかし、lower.htmlを含むiframeはまだそこにあります。

提案がありますか?

TIA。

+0

あなたがのために投票したり、以前の質問から回答を選択しませんでした。なぜ今は誰かがあなたを助けなければならないのですか? –

+0

私はお詫び申し上げます。私は前の答えに応答しようとしていた、それはちょうどすべてが台無しになった。だから、助けていただければ幸いです。 – user1148224

答えて

0

このIframeを削除するには、JS内のラッピング要素を参照する必要があります。

<div class="frame2"> 
<iframe scrolling="no" noresize target="middle" src=""..." name="lower" style="width: 100%; height: 35%">You need a Frames Capable browser to view this content.</iframe> 
</div> 

JS

element = document.getElementById("frame2"); <-- this is the wrapper for your Iframe 
document.removeChild(element); 
+0

ありがとうございます。私はまだそこにはいませんが、私は正しい道にあります。 – user1148224

関連する問題