Different contents of Iframe according to URL

  Gaz W 17:25 14 Nov 2004

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 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


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

HTC U12 Plus review: Hands-on

Frida Kahlo's life, art and legacy explored in Google's new giant online collection and app

Best Android emulators for Mac

Comment importer des contacts d’un iPhone à un autre iPhone ?