打开表单会生成新调整大小的窗口

时间:2012-02-29 21:15:15

标签: javascript forms popup

<script type="text/javascript">
function submitWindow() {
    ..
    // URL, name and attributes
    window.open('http://isivmwebtest.isolutionsinc.com/ComparativePricing/Content/PriceLookup.aspx','windowNew','width=300, height=300');
    return true;
}
</script>
<div class="form-outer">
<div class="resource-form">
<h3>FREE National Price-Look Up Tool</h3>
<h4>Powered by ComparativeHospitalData.com</h4>
<form action="http://isivmwebtest.isolutionsinc.com/ComparativePricing/Gateway.aspx" method="post" onsubmit="return submitWindow()">
<input type="hidden" name="RemoteAction" value="PriceLookup" />
<strong>Enter HCPCS Code(s)</strong><br />
<input onfocus="this.value=''" type="text" name="codes" value="XXXXX or XXXXX,XXXXX or XXXXX-XXXXX" /><br /><br />
<strong>Enter HCPCS Description</strong><br />
<input onfocus="this.value=''" type="text" name="desc" value="partial name okay" /><br /><br />
<input type="submit" value="Search" />
</form>
<span style="font-size:0.8em;font-style:italic;padding-top:10px;">*Search will lead you away from this site.</span>
</div>
</div>

我希望这个表单在一个非常小的弹出窗口中显示结果。我已经厌倦了很多方法而没有任何成功现在我正在使用一些Javascript来使它工作,但它似乎仍然没有做任何事情。有什么帮助吗?

2 个答案:

答案 0 :(得分:0)

除了宽度和高度之外,您还可以在specs参数中传递其他参数。看这里。 http://www.w3schools.com/jsref/met_win_open.asp

您可以删除标题栏,状态栏等,使其缩小。

尝试:

window.open('http://isivmwebtest.isolutionsinc.com/ComparativePricing/Content/PriceLookup.aspx','windowNew','width=300,height=300,location=no,menubar=no,status=no,toolbar=no');

答案 1 :(得分:0)

弹出窗口需要此隐藏字段“RemoteAction”才能将页面重定向到PriceLookup.aspx。这就是弹出窗口没有显示正确页面的原因。