How do I open a link in a new window and set the size after loading the page?
source link: https://www.codesd.com/item/how-do-i-open-a-link-in-a-new-window-and-set-the-size-after-loading-the-page.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
How do I open a link in a new window and set the size after loading the page?
I have a link with querystring like "...com/default3.aspx?id=123?code=456" This link create automatically and sending in mail as a hyperlink. I design default3.aspx page and doing some operations according to querystring. Is that a way open this link in a new window and set window size, after clicked from mail this link?
I tried this but it doesn't work.
<body onload="resizeWindow()" >
...
<script type="text/javascript">
function resizeWindow()
{
// you can get height and width from serverside as well
var width=100;
var height=100;
window.resizeTo(width,height);
}
</script>
Thank you.
Try to open window using window.open like window.open("", "", "width=200, height=100");
Check out sample code at W3Schools http://www.w3schools.com/jsref/met_win_open.asp
Check for demo using Try it yourself
Related Articles
How can I open a link in a new window (and all the following links in this same new window)?
How do I open a link in a new window using css?
Open a link in a new window in the server-side ajax panel
How do I open a link in a new page in the button command in the item model in grid view?
With one click, I want to open the link in a new window and also 2 new tabs in the previous window
Open a link in a new window
Selenium 2: Open the link in a new tab and close the tabs
Open a new window and pass the vb.net asp
Open a new window and pass the collection to viewmodel using mvvm
Visual Studio: Open a symbol source file before debugging and set the breakpoint
How do I open a link to a new tab with the Print command?
How do I open a link in a new tab (not a new window)?
How to open a link in a new tab (chrome) using the selenium Webdriver?
How to open a link in a new window?
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK