Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I create a link that opens a new window of a specific size?

create link opens size window
0
Posted

How do I create a link that opens a new window of a specific size?

0

With HTML, there is no way to control the size (or window decoration, or other features) of a new window. However, in JavaScript you can specify such details when using the window.open() function. Start with a normal HTML link (possibly one that opens in a new window as described in the answer to the previous question). Then use the ONCLICK attribute to open a window with the desired appearance for those readers with JavaScript supported and enabled. The following example specifies a window named “popup” that is 300 pixels by 150 pixels. View Foo Used in this manner, JavaScript can specify a new window with the desired appearance, without blocking access when JavaScript is unsupported/disabled. In addition to the parameters height and width (which take a pixel count as a value), the third argument to the window.open() can include the following booloean paramete

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123