mike55 Posted February 21, 2006 Posted February 21, 2006 Hi all I am trying to call the following piece of javascript, it should simply open a new window and navigate to a particular page. Here is the javascript: function newWindow(){ var doc = document.forms[0]; window.open("http://localhost/testApp/LegalAgreement.aspx", "width=550, height=550, resizable=0, menubar=no, scrollbar=no, status=yes, left=0, top=0") } Here is the code that I use to call the javascript in the page_load event: lBtnAgreement.Attributes.Add("onClick", "return newWindow();") The code is not returning any errors, anyone suggest a solution. I have confirmed that other java script works on the machine, either in the codefile or in the html file. Mike55. Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
mike55 Posted February 21, 2006 Author Posted February 21, 2006 Ok, I have found that the javascript code will work if I remove the width, height, etc. information and the ";" at the end. However if any of them are present, then the code refuses to work. Mike55. Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
mike55 Posted February 21, 2006 Author Posted February 21, 2006 Solution found. It is necessary to place the value null in for the name parameter. Mike55. Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.