Results 1 to 12 of 12
-
03-12-2008, 02:25 PM #1Web Hosting Evangelist
- Join Date
- Feb 2003
- Posts
- 503
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!
-
03-12-2008, 02:41 PM #2Web Hosting Master
- 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.
-
03-12-2008, 03:01 PM #3Web 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....
-
03-12-2008, 03:07 PM #4Web Hosting Evangelist
- Join Date
- Feb 2003
- Posts
- 503
Thanks for pointing me in the right direction!
-
03-12-2008, 03:09 PM #5Web Hosting Evangelist
- Join Date
- Feb 2003
- Posts
- 503
Inside the window is a formmail box for data entry. Unfortunately the resulting page is too big for the template.
Thanks!
-
03-12-2008, 03:52 PM #6Web Hosting Master
- Join Date
- Nov 2003
- Location
- London
- Posts
- 573
-
03-12-2008, 04:04 PM #7Web Hosting Evangelist
- Join Date
- Feb 2003
- Posts
- 503
Doesn't work, I tried that. See
http://bestallstarlimo.com/Links.htm
-
12-30-2009, 02:12 AM #8New 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.
-
12-30-2009, 05:31 AM #9Newbie
- 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.
-
12-30-2009, 05:36 AM #10Web Hosting Master
- 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.
-
12-31-2009, 12:37 PM #11Web Hosting Master
- 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-31-2009, 02:36 PM #12Web Hosting Master
- Join Date
- Aug 2008
- Location
- USA
- Posts
- 697