Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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

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)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...