Results 1 to 12 of 12
  1. #1

    How to cause an IFrame link to open into a new window?

    Hi

    Here is my code, what do I add to make this open in a new window instead of trying to open inside the little iframe?

    <IFRAME SRC="http://www.???.html" target="_blank" height=300p width=468p></IFRAME>

    target="_blank" doesn't help.

    Thanks for any help!
    -----------------------------------
    AmeriWeb Hosting
    One Stop Business Solutions
    AmeriWeb Hosting

  2. #2
    Join Date
    Jul 2003
    Location
    Kuwait
    Posts
    5,104
    You need to use javascript to launch a new window with window.open()

    You can also google 'ajax thickbox' to get another way around the problem.

  3. #3
    Join Date
    Jun 2005
    Posts
    531
    If you're opening a new window, why use IFRAME? Perhaps a simple

    <A HREF="http://www.???.html" target="_blank" ....

    would do? If you really need to constrain the new window's size, then, yeah, as Burhan said, you'll have to make it a Javascript 'onMouseDown' object....

  4. #4
    Thanks for pointing me in the right direction!
    -----------------------------------
    AmeriWeb Hosting
    One Stop Business Solutions
    AmeriWeb Hosting

  5. #5
    Inside the window is a formmail box for data entry. Unfortunately the resulting page is too big for the template.

    Thanks!
    -----------------------------------
    AmeriWeb Hosting
    One Stop Business Solutions
    AmeriWeb Hosting

  6. #6
    Join Date
    Nov 2003
    Location
    London
    Posts
    573
    Quote Originally Posted by robertk1 View Post
    Hi

    Here is my code, what do I add to make this open in a new window instead of trying to open inside the little iframe?

    <IFRAME SRC="http://www.???.html" target="_blank" height=300p width=468p></IFRAME>

    target="_blank" doesn't help.

    Thanks for any help!
    target="_top" does the trick.
    Community Manager @ Cloudflare
    I'm on Twitter too. DMs open.
    Passionate about photography.

  7. #7
    Doesn't work, I tried that. See
    http://bestallstarlimo.com/Links.htm
    -----------------------------------
    AmeriWeb Hosting
    One Stop Business Solutions
    AmeriWeb Hosting

  8. #8

    how do you do that

    okay, I am having the same problem, but now I am thinking that using iframes may not be the solution. I am just trying to put a request more information section on the side of my primary information of my home page, and I want it to be on the side. But, without an iframe it goes on the bottom. I like the request more information part in an iframe because I like the thankyou page to pop up in the same window. But, as for the rest of my home page it really annoys me having the links stay in the iframe....

    so what other ways can I constrain the size of the rest of my home page content, and just keep one iframe... Or how do I use Java Script to allow my src links to pop up in new windows?? please help.

  9. #9
    New Window Links on Pages

    To have a link open in it's own window so people won't be leaving your site, follow these directions:

    A normal link looks like this:

    <a href="somepage.htm">Link Name</a>

    To have the link open in a new window add this:

    <a href="somepage.htm" target="_blank">Link Name</a>


    Predefined targets are:
    _blank
    Loads the page into a new browser window.
    _self
    Loads the page into the current window.
    _parent
    Loads the page into the frame that is superior to the frame the hyperlink is in.
    _top
    Cancels all frames, and loads in full browser window.
    "name"
    You can also use any name for a target and it will load a page into a new window.

    <<signatures to be set up in your profile>>
    Last edited by bear; 12-30-2009 at 09:43 AM.

  10. #10
    Join Date
    Nov 2003
    Location
    London
    Posts
    573
    yes, the <a href="http://www.yourdomainhere.com" target="_top">Link text here</a> code is what you need.
    Community Manager @ Cloudflare
    I'm on Twitter too. DMs open.
    Passionate about photography.

  11. #11
    Join Date
    May 2007
    Posts
    2,745
    Clearly nobody is reading the main point of the thread... In order to limit the size you need Javascript.

    Noticed Moderator Edited Post Here... But missed the SPAM!
    Automated, Secure & Low Cost cPanel Backups (on the cloud)
    For Users & Web Hosting Providers - User Backups

  12. #12
    Join Date
    Aug 2008
    Location
    USA
    Posts
    697
    Don't use iFrames?


    Quote Originally Posted by verdictjosh View Post
    ...
    Noticed Moderator Edited Post Here... But missed the SPAM!
    I know, right? *laughs*
    if ($link == "me")
    {
    echo "
    http://oliviaheart.com";
    }

Tags for this Thread

Posting Permissions

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