打开窗口的脚本 [英] Script for opening a window

查看:88
本文介绍了打开窗口的脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想打开一个新窗口,我已经编写了用于打开窗口的JavaScript,但是它引发了类似预期的错误:".我不知道在何处放置:".这是我在程序中使用的脚本:

Hi,

I want to open a new window I have written the javascript for opening the window but it throws an error like expected ":". I don''t know where to place this ":". Here is the script I am using in my program:

protected void AttachDocument_Click(object sender, EventArgs e)
    {
        String BidId= Convert.ToString(ViewState["BidId"]);
        OpenWindow("FileChooser.aspx?value=" + BidId);
    }
     private void OpenWindow(String FileName)
    {
String script = @"<script language=""javascript"">" + "window.open(" + FileName + "," + "menubar=No,toolbar=No,resizable=No,scrollbars=Yes,status=yes,width=850,height=400,left=100,top=100,screenX=200,screenY=200" + ");" + "</script>";

 ClientScript.RegisterStartupScript(this.GetType(), "OpenWindow", script);
    }




在此先感谢




Thanks in advance

推荐答案

这完全取决于文件名"是什么.在这种情况下,我会删除所有参数,看看它是否仍然有效,然后再次添加它们.
It all depends on what ''filename'' is. In a situation like this, I''d get rid of all the arguments, see if it still works, and then add them again.


这篇关于打开窗口的脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆