【问题标题】:Open form results in new resized window在新的调整大小的窗口中打开表单结果
【发布时间】:2012-02-29 21:15:14
【问题描述】:
<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 来让它工作,但它似乎仍然没有做任何事情。有什么帮助吗?

【问题讨论】:

    标签: javascript forms popup


    【解决方案1】:

    除了宽度和高度之外,您还可以在 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');
    

    【讨论】:

      【解决方案2】:

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2011-12-09
        • 1970-01-01
        • 1970-01-01
        • 2013-02-07
        • 2023-02-10
        • 1970-01-01
        • 2013-09-19
        • 1970-01-01
        相关资源
        最近更新 更多