hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : How to cause an IFrame link to open into a new window?
Reply

Forum Jump

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

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old
Aspiring Evangelist
 
Join Date: Feb 2003
Posts: 442

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




Sponsored Links
  #2  
Old
Community Guide
 
Join Date: Jul 2003
Location: Kuwait
Posts: 5,099
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.

__________________
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise

  #3  
Old
Web Hosting Evangelist
 
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....

Sponsored Links
  #4  
Old
Aspiring Evangelist
 
Join Date: Feb 2003
Posts: 442
Thanks for pointing me in the right direction!

__________________
-----------------------------------
AmeriWeb Hosting
One Stop Business Solutions
AmeriWeb Hosting


  #5  
Old
Aspiring Evangelist
 
Join Date: Feb 2003
Posts: 442
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  
Old
Web Hosting Master
 
Join Date: Nov 2003
Location: Chicago
Posts: 570
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.

__________________
Let's talk custom servers and reseller plans

  #7  
Old
Aspiring Evangelist
 
Join Date: Feb 2003
Posts: 442
Doesn't work, I tried that. See
http://bestallstarlimo.com/Links.htm

__________________
-----------------------------------
AmeriWeb Hosting
One Stop Business Solutions
AmeriWeb Hosting


  #8  
Old
New Member
 
Join Date: Dec 2009
Posts: 1
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  
Old
Newbie
 
Join Date: Dec 2009
Posts: 7
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  
Old
Web Hosting Master
 
Join Date: Nov 2003
Location: Chicago
Posts: 570
yes, the <a href="http://www.yourdomainhere.com" target="_top">Link text here</a> code is what you need.

__________________
Let's talk custom servers and reseller plans

  #11  
Old
Web Hosting Master
 
Join Date: May 2007
Posts: 2,318
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!

  #12  
Old
Web Hosting Master
 
Join Date: Aug 2008
Location: USA
Posts: 696
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";
}


Reply

Related posts from TheWhir.com
Title Type Date Posted
OpenStack Silicon Valley 2014: Video Interview with Jonathan Bryce Whir Tv 2014-09-23 15:47:52
Lance Crosby Lends His Voice to IBM Cloud Commercial Blog 2014-04-14 15:11:29
Interview: Loaded Commerce CEO Salvatore Iozzia at HostingCon Whir Tv 2014-05-02 14:19:45
Interview: BetterServers CEO Matt Heaton at HostingCon Whir Tv 2014-05-02 14:27:02
CenturyLink Enters PaaS Market with AppFog Acquisition Web Hosting News 2013-06-14 12:05:56


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?