View Full Version : Opening a customized sized page from a link

12-31-2005, 04:06 PM
Is it possible to add some code to a hyperlink url such that when one clicks on my link on someone else's site that it opens my site in a customized sized window where their browser's header information, including URL address, would not be displayed (like a popup window)? Or is there some code that I can add to my webpage that will do the same thing when someone accesses this page on my site? Thanks for all the help!

01-01-2006, 06:49 AM
In the first case yes, in fact it would be exactly that, a pop up window:

<a href="http://www.yourdomain.com/index.html" onclick="window.open(this.href,'','width=300, height=250');return false;" target="_blank">Link Text or Image Tag</a>

In the second case, no. Theoretically it can be done but, there are so many and different security features in play on the various browsers that in reality it is not.

You can have a splash or front page from which links like the one above are available.

If a user doesn't have javascript enabled, they will get a plain new window or plain new tab, depending upon their browser and its settings. It can also be done so that if a user doesn't have javascript enabled they will get nothing.

None of this is really that great of an idea though. Pop ups should be reserved for special effects, not a site's main page. Designing a page with the idea in mind that it will be rendered in various sized viewports is the way to go rather than trying to control the user's viewport. Once you take control of the user's viewport, you are alienating many people as well as making your page perhaps inaccessible to some users whose browsers cannot conform to your settings.

01-01-2006, 04:36 PM
I want to thank you for your response.

You gave me an idea that I hope you can help me with. I have used code in the past that refers a visitor to another page when they land on the page that contains this code....URL referral. Is it possible to add code to this referring page that will open the referred page up in customized sized window?...Thanks

01-01-2006, 05:29 PM
Nope, that is really the second case that I was referring to in my last post in this thread. Such things were possible back in the old days (when most folks used IE5) but, with the advent of security measures to help prevent phishing and other abuses, this is no longer doable in any reliable way.

01-01-2006, 07:09 PM
Thanks for all your help John...