Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Old 07-02-2009, 04:33 AM   #1 (permalink)
Contributing Member
 
Join Date: 11-12-07
Location: Markham
Posts: 68
iTrader: 0 / 0%
basslion is liked by many
open iFrame link in a new tab in browser! HeLP!

Okay i know iframes are made to do the opposite, but for my purpose i need to know how to have a link that is located within an iframe be able to be opened in a new tab within the users browser.

the iframe contains external fed pages through javascript. all is great as a person can click a link and then next page loads within the iframe, but there is an issue as the final page in the loops is a checkout page and we want this page to open in a new tab so the user can see the https: and feel secure.

is there any way to control links within an iframe to open in a new tab?
basslion is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-02-2009, 07:20 AM   #2 (permalink)
Moderator
 
Hades's Avatar
 
Join Date: 01-23-07
Location: Buenos Aires
Posts: 1,057
iTrader: 0 / 0%
Hades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest orderHades is a web professional of the highest order
just put the attribute: target="_blank" in the <a href> tag. Even if it is within an iframe it will open in a new window/tab on the browser.
__________________
Hades,
Ancient god, King of the Nether World, and Guardian of the Dead.
...and on my free time I'm also a web developer, contact me if you need one!
Hades is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-02-2009, 04:16 PM   #3 (permalink)
Contributing Member
 
Join Date: 11-12-07
Location: Markham
Posts: 68
iTrader: 0 / 0%
basslion is liked by many
the iframe is loading pages from another website for which i have no control and cannot edit the links. I would like to somehow control all links within the iframe to open in a new tab. there must be an iframe control that does this even if the pages being loaded from another site have links set to open in _self.
basslion is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-02-2009, 04:33 PM   #4 (permalink)
Meeow!
 
Costin Trifan's Avatar
 
Join Date: 04-13-07
Location: Romania
Posts: 3,235
iTrader: 0 / 0%
Latest Blog:
None

Costin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest order
you will not be able to control the content of a remote iframe.
__________________
...to be continued
Costin Trifan is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-02-2009, 06:03 PM   #5 (permalink)
Super Moderator
 
htmlbasictutor's Avatar
 
Join Date: 10-29-07
Location: British Columbia, Canada
Posts: 2,968
iTrader: 0 / 0%
Latest Blog:
Website Testing

htmlbasictutor is a highly respected web prohtmlbasictutor is a highly respected web prohtmlbasictutor is a highly respected web prohtmlbasictutor is a highly respected web prohtmlbasictutor is a highly respected web prohtmlbasictutor is a highly respected web prohtmlbasictutor is a highly respected web prohtmlbasictutor is a highly respected web prohtmlbasictutor is a highly respected web prohtmlbasictutor is a highly respected web prohtmlbasictutor is a highly respected web pro
Iframe does not have a target attribute.
__________________
HTML Basic Tutor - Learn to code your web pages/blogs to be cross-browser compatible
Basic Computer Information - Computer Basics for website owners
htmlbasictutor is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-02-2009, 11:04 PM   #6 (permalink)
Meeow!
 
Costin Trifan's Avatar
 
Join Date: 04-13-07
Location: Romania
Posts: 3,235
iTrader: 0 / 0%
Latest Blog:
None

Costin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest order
^^ I don't quite understand what you mean by that but:
- Hades was referring to adding the target="_blank" to links
- me, well...I suppose I wasn't very clear; what I meant is that when displaying a page from an other domain in an iframe you will not be able to access that page because of the same origin policy which makes it impossible of adding the target="_blank" to links inside that iframe using javascript.
__________________
...to be continued
Costin Trifan is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open new browser window in Full Screen Javascript Help 2939195631902 Coding Forum 11 01-29-2009 09:32 AM
problem to open windows with link. madcaptains Coding Forum 10 03-10-2008 05:44 AM
CSS a:link not working in browser worldly1 Coding Forum 3 07-06-2007 12:34 PM
How to make a page open at the top after refreshing/reloading by browser? Vidra Coding Forum 3 12-17-2006 07:31 PM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 07:03 PM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.