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.

Open a Link in a new page for a specific frame?

Featured Replies

Hi,

This is probably quite simple. What I have is a frameset page with two frames, a top frame and a main frame beneath it. It is going to be used to preview websites. On the main page with the websites listed I want to have links for these websites open in the frameset page and then open the specific website in the mainframe without having to have a seperate frame set for each website.

 

I.e

 

Website 1 Link - User would click this link and it would open the frameset page and load Website 1 in the main frame.

 

I think this explains clear enough.

 

Anyone know how this is done?

In the frameset file you give any frame you want to link to a name:-

<frame src="framesetcontent.html" name="maincontent">

 

then in the frame which has the links you use target="..." and name the target frame:-

 

You target a frame with a name using target="maincontent" if the frame code in the frameset file has name="maincontent". Although HTML/XHTML normally requires "id" to be used instead of "name"; in this instance "id" does not work so "name" must be used.

 

This link opens in the maincontent frame (and creates scrollbars if necessary) because the code is:-

 

<a href="page2.html" target="maincontent">Page 2 link</a>

 

See http://www.wickham43.net/framesets.php

 

You can use the same target for all the links so they all open in the same frame.

 

Use a framesets doctype.

I've thought about it, but I don't know a solution. You want the link from another page to open a frameset - simple - but the page in the main frame has to change depending on which the link is clicked on the other page.

 

The frameset sets the initial page for the main frame, so some language like PHP or javascript would have to take an instruction to change the url in the frame inside the frameset. It's obviously simpler to set up different frameset pages with different link urls in the other page.

 

You could simplify it by using PHP "includes". You would have different links in the other web page to page1.php, page2.php, etc. but they would be frameset pages.

 

Page1.php and page2.php would have PHP "include" files for the common frameset code before the frame code <frame src="page2.html" name="maincontent"> and then another "include" for the frameset code after the frame code but this isn't any different from setting up several different frameset files.

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.