February 22, 201115 yr I have a little problem that I can't seem to find the answer for. In my webdesign class I have to make a website using iframes. I made an index page with two iframes present, one containing the menu links and one for displaying the content. I want the content iframe to change depending on what link you press in the menu iframe, is this possible? Also is it possible to have the iframe pages display as semi-transparent boxes? Thank you for your attention. - NJ
February 22, 201115 yr I have a little problem that I can't seem to find the answer for. In my webdesign class I have to make a website using iframes. I made an index page with two iframes present, one containing the menu links and one for displaying the content. I want the content iframe to change depending on what link you press in the menu iframe, is this possible? Also is it possible to have the iframe pages display as semi-transparent boxes? Thank you for your attention. - NJ You can access the contents of iframes from the parent page but only if the iframe content is from the same site. Otherwise same-origin policy forbids it. If it's all from the same site though, you can add event listeners in the parent for one iframe, then do some stuff in the other iframe based on that. As for making them semi-transparent, just add opacity: 0.5 (or whatever) to the CSS for iframes.
February 22, 201115 yr A better way to do this, is to have the content inside an iframe, but the menu just inside a div on the page. You can then set the target of a link to the iframe <a href="page.htm" target="iframecontent">Page</a> Good luck.
Create an account or sign in to comment