HTML link... possible?

  Simsy 18:35 20 Apr 2004
Locked

Hi folks,

I wonder if this can be done….

I'm putting together a little compilation of photos onto CD for someone. The CD will autorun and open a "Welcome" page that is a "Webpage"

This page has 3 links on it. One opens a slideshow exe, the second opens another HTML page that has thumbnails of the photos, and the third is where I have a problem…

This third link is to another HTML page… it contains 2 frames, a banner frame at the top and a main body below…

This main body also contains 2 frames. A "menu"**, (consisting of thumbnails), on the left, and the main display area on the right. Clicking on one of the thumbnails on the left displays it in the main display area. I have no problem with any of this… I have complied it by hand coding HTML. (I like a challenge!)

What I want to achieve, is a link on this "menu"** that will take the viewer back to the "Welcome" page, in a full window, not within the frames, i.e. back to the start as if none of the links on the welcome page had been clicked.

I hope this makes sense…

Is this possible using vanilla HTML? So far I can only make the page appear within the frames.

Thanks in anticipation,

Regards,

Simsy

  Taran 19:38 20 Apr 2004

Add this into your <a href hyperlink code:

target="_top"

or

target="_parent"

The whole hyperlink code, minus the opening and closing <> tags, would be:

a href="pagename.html" target="_top">Link Text</a

This should reload the page the link points to into a new, single page, without any frames in sight.

If you aren't happy with it or you find problems with it, there are some nice JavaScripts you can embed which reload pages from frames into a frameless layout.

Different browsers sometimes trip up on frame reloads but I've always had pretty good results with the target="_top" solution. Some of the JavaScripts I mentioned use the target="_top" to reload the page, combind with some extra instructions in the page header.

In brief, adding these snippets into your hyperlinks will result in the following:

1. target="_top" reloads the hyperlink target page into frameless browser

2. target="_blank" opens the hyperlink target page into a new browser window

3. target="_parent" loads the hyperlink target page in place of the page currently being displayed in the browser

4. target="_self" loads the hyperlink target page in place of the page the link was on.

Note that the above is not a fully accurate description and I really have oversimplified the actual process and end result, but it covers the basic nuts and bolts of manipulating hyperlinks and should give you a workable result.

T

  Simsy 22:25 20 Apr 2004

I'll get further into this tomorrow.

Much appreciated, as usual.

Regards.

Simsy

  Simsy 06:53 21 Apr 2004

Thanks Taran.

One thing I'm not 100% clear on, having read your advice above, is the difference between the "_top" and "_parent" links? I have used the "_top" and it seems to do what I was after...

However, I wonder if it is dependant on Browser settings... Would I be right in thinking that the "_top" option, (given appropriate browser settings), MIGHT open the linked page in a new window, whereas the "_parent" option will always open the page in the window containing the link?

(I will try this later, I'm really posing the question to prompt you to clarify for the benefit of any subsequent searchers!)

Regards,

Simsy

  Taran 10:03 21 Apr 2004

Well, this is my own fault for not explaining thoroughly.

I did say that I'd oversimplified things and that my description was very general, so here is the full skinny for you.

target="_top" loads the linked document in the topmost frame of a frameset which, in real money, means that it replaces the whole frameset with a single page that fills the browser window. In the event that there is no top frame (left navigation panel and right main content layout for example) it will still work because the browser will simply load the target page into what would be a top frame, which allows it to use the whole browser window.

target="_parent" is used where a frameset file is nested inside another frameset file. If you place a target="_parent" link in one of the inner frameset documents it will load the new hyperlinked target document where the inner frameset file had been. In simple terms, it overwrites the source page with the target page.

The variations of some browsers can affect the overall output, but that goes for a good many things, not just for tweaked hyperlinks. Some browsers may trip up over these links but most will cope with them just fine. In fact, I prefer to use these methods than the built in JavaScript behaviours in Dreamweaver. These often fall foul of pop-up killers and certain browsers that feature pop-up stoppers, which is where the target="x" comes into its own. Nothing though, is 100% bullet proof.

I've probably just made things even muddier for you, but it serves you right for asking...

;o)

  Simsy 11:40 23 Apr 2004

Regards,

Simsy

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Galaxy Note 8 vs iPhone X

Awful clip art from 1994 is being tweeted every hour by a bot

iPhone X vs Samsung Galaxy Note 8

Les meilleurs navigateurs internet 2017