Hello all,

I have a frameset which contains two frames called 'menu' (to place my menu) and 'content' to place my main page. when you click a link in the 'menu' frame, the url opens in the 'content' frame.

In the 'content' frame I have an iframe name 'bodyText'. I want to be able to click a link on the 'menu' frame and make it open a url in the 'bodyText' iframe on the 'content' frame using javascript. Can someone help me please.

Thanks,

Ladel

Thanks all,

I found a solution to it. this is what i did

1. on 'menu' frame, i place this code right after the body element " <base target='content'>. This tells the 'menu' frame to open all clicked links in the 'content' frame.
2. Then i create the link i want to click. In the 'menu' frame I did this <a href="javascript:openInIFrame('supermakert.html') > Supermarket Stores </a> this link calls a javascript called openInIFrame; now, as specified in 1 above the browser will expect to execute the javascript function in the 'content' frame because we have initially told the browser to open all new link in the 'content' frame. So you will have to store the openInIFrame function inside the 'content' frame head tag

3. I Opened the 'content' frame and placed openInIFrame(url) javascript function in the head tag. the function is as below

<head> 
   <script laguage='javascript'>
      function openInIFrame(url)
       {
          //open url in iframe 'iFrameID'
          document.getElementByID('iFrameID').src=url;
      }
   </script>

</head>

I think this is what I need for my site as well. I want users to be able to click on the "read more" of the text box and new content load in the same spot. However, I am not quite understand how to did this can you send me a sample html page with your code in it so I can modify it for my needs..thanks! Donna

This question has already been answered. Start a new discussion instead.