davearia Posted July 21, 2005 Posted July 21, 2005 Hi All, <a class="glink" id="gl3" title="Get An OnlineCalculation" href="http://localhost/mip/default.aspx?Action=1003" target="_blank">Estimate</a> This code will currently open a new web page. But I would prefer to set its size something other maximised and also centre it to the screen. I have tried adding width & height attributes but the are not recognised in Visual Studio and make no difference when the code runs Please help. Thanks, Dave. :D :D :D Quote
mike55 Posted July 25, 2005 Posted July 25, 2005 Add the following javascript code behind your page in the appropriate location: function newWindow(){ var doc = document.forms[0]; window.open("http://localhost/webAppFTP/WebForm2.aspx", "Welcome", "width=350, height=25, resizeable=0, menubar=no, scrollbars=no, status=yes, left=0 , top=0") } Add the following code to the button that opens the new page: Me.btnWindow.Attributes.Add("onClick", "return newWindow();") Your are going to have to mess around with the variables to get the correct size and location that you want. 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.