Different contents of Iframe according to URL

  Gaz W 17:25 14 Nov 04

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 W 19:39 14 Nov 04

Any ideas?

  Gaz W 19:44 14 Nov 04

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

I was trying to say that adding


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.

Battlefield 1 review: Destructive environments, phenomenal graphics and an emotional campaign make…

1995-2015: How technology has changed the world in 20 years

Microsoft HoloLens hands-on review

How to use System Preferences in macOS Sierra (and Mac OS X): Complete guide to personalising the…