HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Link in iFrame to the same browser window?
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Frame
View previous topic :: View next topic  
Author Message
seanie morris



Joined: 02 Jun 2005
Posts: 49
Location: Offaly, Ireland

PostPosted: Mon Jul 09, 2007 6:55 am     Link in iFrame to the same browser window? Reply with quote

Hi folks,

I have added a small iFrame which shows a thumbnail from a gallery I have installed (4Images). The work-in-progress and the 'thumbnail iframe' can be seen here:

http://www.tullamorelife.net/index2.html

I tweaked an associated php file for the 4Images gallery programme to open up from when the thumbnail is clicked to (what will be my new) site gallery introduction page, instead of the actual image in the 4Images gallery. However, as it is embedded in the iframe, the only way I can find opening the page properly is with the "_blank" target path. Using "_parent" and "_self" will only open up the page in the tiny iFrame. Can this be ovrcome?

I have looked back on some older posts, and I am not sure, but would the following post suit my request?

http://www.htmlcodetutorial.com/help/ftopic8381.html

Thanks for looking,

Seanie.
Corey Bryant



Joined: 15 May 2004
Posts: 8154
Location: Castle Rock CO USA

PostPosted: Mon Jul 09, 2007 11:14 am     Reply with quote

is the the code
Code:
<iframe src="http://www.tullamorelife.net/4images/random.php" href="../gallery.html" target="_blank" align="center" width="175" height="155" scrolling="No" frameborder="0" bgcolor="#C9D3DE"> </iframe>
And what do you want to happen when you click on this link to open up gallery.html?

_________________
Corey
Toll Free Fax Numbers | Yahoo Merchant Account
seanie morris



Joined: 02 Jun 2005
Posts: 49
Location: Offaly, Ireland

PostPosted: Mon Jul 09, 2007 1:17 pm     Reply with quote

Hi Corey,
that is the current code above, yes. What I want to do is replace the "_blank" tag with "_parent" or "_self" and have the link open in the same browser window, and not a new one, and also not in the iframe from which the link as you can see is contained therein.

Seanie.
Corey Bryant



Joined: 15 May 2004
Posts: 8154
Location: Castle Rock CO USA

PostPosted: Tue Jul 10, 2007 6:57 am     Reply with quote

Name your iframe and then target your iframe.
Code:
<iframe src="http://www.tullamorelife.net/4images/random.php" href="../gallery.html" target="gallery" name="gallery" align="center" width="175" height="155" scrolling="No" frameborder="0" bgcolor="#C9D3DE"> </iframe>


_________________
Corey
Toll Free Fax Numbers | Merchant Accounts
seanie morris



Joined: 02 Jun 2005
Posts: 49
Location: Offaly, Ireland

PostPosted: Tue Jul 10, 2007 12:46 pm     Reply with quote

Corey Bryant wrote:
Name your iframe and then target your iframe.


Won't that mean then Corey that it will simply do what it is already doing? You can see it live the little iframe I am talkin about on the homepage www.tullamorelife.net in the Galleries box in the centre of the page. I managed to tweak the referenced php file from the galleries directory to open the link (referenced by the thmbnail(s) visible) in a new window.

I want to open it in the same window, NOT the tiny iframe that is present. Exclamation

Seanie.
seanie morris



Joined: 02 Jun 2005
Posts: 49
Location: Offaly, Ireland

PostPosted: Tue Jul 10, 2007 12:49 pm     Reply with quote

By the way, if there was no solution, but even out of curiosity anyway, can I contain the whole body of the webpage in an iframe? Then give that a name (e.g. "mainiframe"), and reference the link from the thumbnails iframe to "mainiframe"?
Corey Bryant



Joined: 15 May 2004
Posts: 8154
Location: Castle Rock CO USA

PostPosted: Wed Jul 11, 2007 6:05 am     Reply with quote

You could try to target the mainframe - but you seemed to have two iframes. Any reason why you are using iframes? They cause more problems unfortunately.

_________________
Corey
Toll Free Fax Numbers | Mile High Merchant Accounts
seanie morris



Joined: 02 Jun 2005
Posts: 49
Location: Offaly, Ireland

PostPosted: Wed Jul 11, 2007 8:49 am     Reply with quote

Corey Bryant wrote:
You could try to target the mainframe - but you seemed to have two iframes. Any reason why you are using iframes? They cause more problems unfortunately.


Do they? Darn. I thought iframes eliminate older browsers ability to read webpages made up of regular frames properly. The 2 iframes present are requested from the source of what I wanted to add. But, I think I might tinker around with them to see if I could get them to work in ordinary div's. My attempts to do that were resulting in at least the Gallery thumbnail iframe not working. But then, I'm no expert, so I probably overlooked something in the code. Rolling Eyes
Corey Bryant



Joined: 15 May 2004
Posts: 8154
Location: Castle Rock CO USA

PostPosted: Wed Jul 11, 2007 10:43 am     Reply with quote

Frames / iframes are basically the same (problematic) thing. I view a lot of sites on my Blackberry and frames are very cumbersome on a browser like that.

Use divs or even tables to help layout a website. In my opinion (and a lot of others) frames just should not be used at all - from SE point-of-views to browsers.

_________________
Corey
My Merchant Account Blog | Merchant Accounts | Bookkeeper Program
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Frame All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial