Highlighted

Frames Refresh problem (urgent!!)

New Here ,
Aug 18, 2018

Copy link to clipboard

Copied

Hi. I am now working on my school project which required me to create a website. For a easier management, i create a frameset.

However, when i am reviewing my website in Chrome, i find that every time when i press the refresh button (F5), it will bring me back to the homepage.

What should i do to correct this problem and let it stay on the same page??

I found that this problem only happened when i am using Chrome cause I've try it on IExplore and everything is fine.

Sorry for any grammar mistakes and i hope that someone can help me asap since i have to hand in the project before September.

Adobe Community Professional
Correct answer by BenPleysier | Adobe Community Professional

The best solution is to use SSI (Server Side Includes), but this requires PHP. If you do not have PHP, the likelihood of being able to use SSI is practically none.

To use this option

1. create an include file called nav.php - actually, the extension can be anything including html and txt. I tend to use nav.inc.php.

<ul>

  <li><a href="index.php">Home</a></li>

  <li><a href="services.php">Services</a></li>

  <li><a href="about.php">About</a></li>

</ul>

2. include the file into your main document e.g. index.php

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>Untitled Document</title>

</head>

<body>

  <?php include 'nav.php'; ?>

  <div> content goes here </div>

</body>

</html>

The next best option is to use JS (JavaScript).

1. create an include file called nav.js

document.getElementById("navMenu").innerHTML =

'<ul>'+

  '<li><a href="index.html">Home</a></li>'+

  '<li><a href="services.html">Services</a></li>'+

  '<li><a href="about.html">About</a></li>'+

'</ul>';

2. include the file into your main document e.g. index.html

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>Untitled Document</title>

</head>

<body>

  <nav id="navMenu"></nav>

  <div> content goes here </div>

  <script src="nav.js"></script>

</body>

</html>

A last option is to use an IFRAME as in HTML Iframes. I will not expand on this because it comes will all sorts of adjustments.

Views

227

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Frames Refresh problem (urgent!!)

New Here ,
Aug 18, 2018

Copy link to clipboard

Copied

Hi. I am now working on my school project which required me to create a website. For a easier management, i create a frameset.

However, when i am reviewing my website in Chrome, i find that every time when i press the refresh button (F5), it will bring me back to the homepage.

What should i do to correct this problem and let it stay on the same page??

I found that this problem only happened when i am using Chrome cause I've try it on IExplore and everything is fine.

Sorry for any grammar mistakes and i hope that someone can help me asap since i have to hand in the project before September.

Adobe Community Professional
Correct answer by BenPleysier | Adobe Community Professional

The best solution is to use SSI (Server Side Includes), but this requires PHP. If you do not have PHP, the likelihood of being able to use SSI is practically none.

To use this option

1. create an include file called nav.php - actually, the extension can be anything including html and txt. I tend to use nav.inc.php.

<ul>

  <li><a href="index.php">Home</a></li>

  <li><a href="services.php">Services</a></li>

  <li><a href="about.php">About</a></li>

</ul>

2. include the file into your main document e.g. index.php

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>Untitled Document</title>

</head>

<body>

  <?php include 'nav.php'; ?>

  <div> content goes here </div>

</body>

</html>

The next best option is to use JS (JavaScript).

1. create an include file called nav.js

document.getElementById("navMenu").innerHTML =

'<ul>'+

  '<li><a href="index.html">Home</a></li>'+

  '<li><a href="services.html">Services</a></li>'+

  '<li><a href="about.html">About</a></li>'+

'</ul>';

2. include the file into your main document e.g. index.html

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>Untitled Document</title>

</head>

<body>

  <nav id="navMenu"></nav>

  <div> content goes here </div>

  <script src="nav.js"></script>

</body>

</html>

A last option is to use an IFRAME as in HTML Iframes. I will not expand on this because it comes will all sorts of adjustments.

Views

228

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 18, 2018 0
Adobe Community Professional ,
Aug 18, 2018

Copy link to clipboard

Copied

Do not use frames.   Frames were dropped from HTML5  several years ago.   Most modern browsers and mobile devices cannot support  frames.  I hope for your sake that your instructor is not telling you to use frames because nobody uses them anymore.

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 18, 2018 0
New Here ,
Aug 18, 2018

Copy link to clipboard

Copied

Oh I see. But without using the frame, I will have to copy my banner and menu to every page and I afraid that I will mess up all the hyperlink. Do you have any better suggestion to help me with the management?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 18, 2018 0
Adobe Community Professional ,
Aug 18, 2018

Copy link to clipboard

Copied

The best solution is to use SSI (Server Side Includes), but this requires PHP. If you do not have PHP, the likelihood of being able to use SSI is practically none.

To use this option

1. create an include file called nav.php - actually, the extension can be anything including html and txt. I tend to use nav.inc.php.

<ul>

  <li><a href="index.php">Home</a></li>

  <li><a href="services.php">Services</a></li>

  <li><a href="about.php">About</a></li>

</ul>

2. include the file into your main document e.g. index.php

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>Untitled Document</title>

</head>

<body>

  <?php include 'nav.php'; ?>

  <div> content goes here </div>

</body>

</html>

The next best option is to use JS (JavaScript).

1. create an include file called nav.js

document.getElementById("navMenu").innerHTML =

'<ul>'+

  '<li><a href="index.html">Home</a></li>'+

  '<li><a href="services.html">Services</a></li>'+

  '<li><a href="about.html">About</a></li>'+

'</ul>';

2. include the file into your main document e.g. index.html

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>Untitled Document</title>

</head>

<body>

  <nav id="navMenu"></nav>

  <div> content goes here </div>

  <script src="nav.js"></script>

</body>

</html>

A last option is to use an IFRAME as in HTML Iframes. I will not expand on this because it comes will all sorts of adjustments.


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 18, 2018 1
ctp_coco LATEST
New Here ,
Aug 18, 2018

Copy link to clipboard

Copied

Thx a lot. I will try this later after I finished building the remaining pages.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 18, 2018 0