Different contents of Iframe according to URL

  Gaz W 17:25 14 Nov 2004
Locked

I have a page with an iframe named "Content" on it. I want it to displaya different page in that iframe depending on the URL of the page. For example:

click here

would show page1.html in the iframe, and:

click here

would show page2.html in the iframe, etc...

Basically I would like to do this for unlimited different pages, so specifying a variable manually for each one in JavaScript would be no good.

It would also be good if I could drop the ".html" by adding it on to the end in the JavaScript.

I've tried a few different things but all have resulted in a blank iframe.

Thanks in advance for any help,

Gaz

  Gaz W 19:39 14 Nov 2004

Any ideas?

  Gaz W 19:44 14 Nov 2004

By the way those weren't links in my original posting!

I was trying to say that adding

?x=page1.html

to the end of the URL would mean that page1.html would be shown in the iframe. Anything specified on the end would be shown in there.

Does anyone know what I'm talking about?

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

Elsewhere on IDG sites

AMD Radeon Adrenalin release date, new features, compatible graphics cards

Print designer Kelly Anna on confident mark making & modern femininity

New iMac Pro release date, UK price & specs rumours

Comment créer, utiliser et supprimer son compte Facebook ?