My home page is made up of two seperate web pages - one contents and one for the actual website. When a link in the contents is clicked it loads in the main web site page.

When an external website is linked to my site it has to go to the home page so that the contents is also there.
Is it possible to have an external link which opens another page with the contents?

Hope I've explained this clearly enough :o


Nope, not nearly clearly enough. It's ok, in this particular section of Daniweb, to post links to the site in question. Show us your page(s). Then explain what you want the external link to do.

What I think you're trying to do is:



Those are two separate pages. If I really like something on your contents page, and make a link to it, you really want that link to be redirected to mainpage, but to "load" whatever it was on contents that the link is to. Right?

It would help so much to see your site, please give is a link.

Sorry, I'll try again...

My site loads up with index.html

index.html is made up of 2 seperate pages - contents.html and home.html

when someone clicks a link (e.g. Guest Book) in contents.html
Guest_book.html will load up where home.html was.

So the it is always using index.html which has the code :

<frameset cols="120,*" border=0>
<frame src="contents.html">
<frame src="home.html" name="showframe">

Therefore, a link to index.html will always load the home page (with contents).

I want to have a link from an external site which will load contents.html and Guest_book.html in the index.

without having to write a new index.html e.g. index_Guest_book.html which would use...

<frameset cols="120,*" border=0>
<frame src="contents.html">
<frame src="index_Guest_book.html" name="showframe">

If you still don't get me I'll just give you a link to my website!


Ah, the joys of frames. I think that the best way to do what you want would be to set up a new page that the external site will link to; let's call it exguest.html (external guestbook). Then use the code from your index page and alter it accordingly:


<frameset cols="120,*" border=0>
<frame src="contents.html">
<frame src="Guest_book.html" name="showframe">

Hope this helps


I not always recommend frame site for 2 main reasons:
1. not entirely search engine friendly
2. there's chance visitors find your framed page (content) rather than the index page.

I would suggest you use javascript to redirect your visitors to index.html when they accidentally come to content page directly (no frame).

Ah... answer to your question is NO, unless you set up another page to do the job like Mike suggested. Alternatively, if you know server side language, then use asp or php to create dynamic site.

To Mike:

Yeah, I thought I'd have to do that.

It's Just a bit annoying if I have to do that for any page that has an external link to it.

Thanks Anyway,

To Zipee:

How would I use Javascript to redirect someone from the contents if it was opened without a frame?