frames ? layers ?

I'm on my biggest html project and need help how to work this out.

On the home page, I want to put my links (and buttons) in a left sided frame.  On the right side of the frames, I want to have images that are layered (I'm not certain if I'm using the right word) but the images must be changing (in rotation) every 3 seconds.

Whenever the reader wants to open a link, they click on it from the frame and the layered images will disappear and replace with the info page coming from the link.

Is html capable of doing this? Your help is greatly appreciated.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

HTML is capable of it, but don't use frames... they're horrible.

Try using a table like this :

<TR><TD WIDTH=xxx>
***menu list***

Now, just replace the width=xxx with however wide (in pixels) you want the menu to be and you're sorted... the only problem is that you will have to copy the code for every page you have.
Despite gravity's objection, what you want to accomplish is probably most easily accomplished using frames.  However, you will probably need some scripting (to replace your images), in addition to HTML.

In your frameset, you will need to target the links in the left frame to the right frame.

In the right frame, your initial page must contain an array of images, along with a script which will change the image every three seconds.

The code will look something like:

** frameset.htm **
<frameset cols="25%,*">
<frame name="left" src="left.htm">
<frame name="right" scr="gifs.htm">

** left.htm **
<a href="mylink.htm" target="right">My Link</a>

** gifs.htm **
var img()
img(0) = "first.gif"
img(1) = "second.gif"
img(2) = "third.gif"

function switch(nextgif) {
   var nextgif
   if (nextgif == "first.gif") {
      nextgif = "second.gif"
   } else if (nextgif == "second.gif") {
      nextgif = "third.gif"
   } else {
      nextgif = "first.gif"
   setTimeout("document.myGif.src = nextgif", 3000)

<body onload="switch(document.myGif.src)">
<img name="myGif" src="first.gif">

I have left a lot of the other code (which is needed to create the documents) out.  These are the elements which should accomplish what you want.

There are probably more elegant ways to accomplish the image switching.

If this is the direction you wish to go, we can refine the code to get what you want.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jamaicaAuthor Commented:
TTom, yes you're on target with what I need!

Definitely want to go further with the codes you've introduced above.

I've tried using a

     onMouseOver document.img.src ~~~

I've been trying to enhance on what you have suggested but still can use some help.

Thank you very much!!
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Ask away (let me know what is causing problems or what doesn't work the way you would like)!  I will try to help however I can.

Jan LouwerensSoftware EngineerCommented:
check this site for lots of cool javascript tricks:
<frameset  cols="20%,*" framespace="0" border="0" frameborder="0">
    <frame name="1" src="frame.htm" marginwidth="10" marginheight="10" scrolling="no" frameborder="yes" noresize>
    <frame name="2" src="gifs.htm" marginwidth="10" marginheight="10" scrolling="auto" frameborder="no" noresize>
If you want gifs just type inthe code
<img src="name" alt="text"> around it you can use <p align="left, right or center"></p>

Example: A pic to the right
<p align="right"><img src="garfield.gif" alt="Garfield"></p>

Try it out
jamaicaAuthor Commented:
TTom, I worked with what you had given me and have accomplished what I needed!

I've made further enhancements to it by taking the images out of the frame and putting it into the body of the main.html page.

I'm still a bit an intermediate but have bought a book on DTML, which I hope will be helpful :)  BTW, the book is titled "Dynamic HtML in Action, Web Technology", by Eric Schurman and William Pardi.

To everyone else, your help is also invaluable and much appreciated!

jamaica aka Sandi
Congratulations!  Always glad to help.  Even MORE gratified when what I have supplied can be used and expanded upon.  Makes me feel like a teacher in addition to being a techie!


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.