Click here to Skip to main content
15,559,682 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am using the java script to open a window. Its working fine in Chrome and mozila but it is not working in IE. It throws the error as invalid argument. Here is the code:
private void OpenWindow(String FileName, string WindowName)
   {
String script = @"<script language='javascript'>" + "window.open('" + FileName + "'," + "'width=550,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no, scrollbars=no,resizable=yes,copyhistory=no');" + "</script>";
ClientScript.RegisterStartupScript(this.GetType(), "OpenWindow", script);
    }


protected void AttachDocument_Click(object sender, EventArgs e)
    {
        String BidId = Convert.ToString(ViewState["BidId"]);
        OpenWindow("FileChooser.aspx?value=" + BidId, "");
    }
Posted

Check these link i think it will help you :link [Register]
 
Share this answer
 
rather than using yes and no use 0 and 1
 
Share this answer
 
Comments
Member 7946563 6-Aug-11 2:56am    
No still getting the same error

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900