Open link in new sized window

Is there a way to open a link in a new window. That is presized? not a new tab, but a completely new window that would be set to like 600x800 for example?

and at the same time pass this? The W3C Markup Validation Service

You could do this with unobtrusive javascript. By progressively enhancing existing content, you’ll pass validation and also cater for users without JavaScript.

So for example, let’s say you have a link:

<a href="http://example.com" id="external-link">Link to example.com</a>

You could add a click-handler to the link that calls window.open()

e.g. of the window.open call


//I'm assuming here that you've defined "theHREF" to be the href of the "external-link" in the click handler function.
window.open(theHREF, "NewWindowDescriptiveName", "width=800,height=600");

There are a bunch of other options you can set alongside width and height, check out the MDN documentation

I appreciate this. I will take a look. Thanks.