Javascript 使用目标作为动态创建的php页面的iframe
我有一个动态php脚本,我希望在iframe中显示它的响应Javascript 使用目标作为动态创建的php页面的iframe,javascript,php,html,iframe,Javascript,Php,Html,Iframe,我有一个动态php脚本,我希望在iframe中显示它的响应 <div id="plotpnl"> <b>Graph :</b><br><br> <form action="create_charts.php" method="post" target="iframe_a"> <font color="#587E91"><b>Strats : </b><
<div id="plotpnl">
<b>Graph :</b><br><br>
<form action="create_charts.php" method="post" target="iframe_a">
<font color="#587E91"><b>Strats : </b></font>
<input type="text" style="width:220px; margin:0 auto;" name="stratlist" placeholder="comma separated strat list"/>
<font color="#587E91"><b>Columns : </b></font>
<input type="text" style="width:265px; margin:0 auto;" name="collist" placeholder="comma separated columns list" />
<input type="submit" value="Plot" style="color:#587E91;font-weight:bold"/> <input type="button" value="Wipe" style="color:#587E91;font-weight:bold" onClick="this.form.reset()"/>
<iframe width="100%" height="300px" src="DUMMY.php" name="iframe_a"></iframe>
</form>
</div>
当我使用target=iframe\u a时,我无法理解为什么内容没有重定向到iframe。如果我使用target=“\u blank”,代码显示良好
$stratlist=$_POST['stratlist'];
$collist=$_POST['collist'];
#echo "stratlist : $stratlist , collist : $collist , inst_list : $instlist";
$cmd1 = "makeaphpcode.sh \"$stratlist\" \"$collist\" \"pnl\"";
exec($cmd1);
$filename="plot.pnl.$stratlist.$collist.php";
$filename=str_replace(',','.',$filename);
$filename=str_replace(' ','',$filename);
if (!headers_sent($file, $line)){
header("Location:mysite.com/$filename");
exit;
}else{
echo "Headers sent in $file on line $line";
exit;