Results 1 to 5 of 5

Thread: Opening a customized sized page from a link

  1. #1
    Join Date
    Dec 2005
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Opening a customized sized page from a link

    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!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    In the first case yes, in fact it would be exactly that, a pop up window:

    HTML Code:
    <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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2005
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default thanks John, got one more question for you

    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

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Dec 2005
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for all your help John...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •