Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

iframes loading content from other iframes?

Featured Replies

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

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.

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.