• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Adding a page to 4_4_Multiple_web_pages

Q&A Forum › Adding a page to 4_4_Multiple_web_pages
0 Vote Up Vote Down
Kurt Kristensen asked 1 year ago

I want to add a new page called “sensor” to 4_4_Multiple_web_pages by doing this

 /<div class=”topnav” id=”myTopnav”>
  /    <a href=”#” class=”disabled”>ESP Web Server</a>
  /    <div class=”topnav-right”>
  /      <a href=”sensor”>Sensor</a>
  /      <a href=”outputs”>Outputs</a>
  /      <a href=”sensors”>Sensors</a>
  /      <a href=”/”>About</a>
  /    </div>

The new HTML page is located in the “data” folder and is a copy of “about.html”.
After saving and build the new image
1. Build filesystem image
2. Upload filesystem image
All 4 icons is now in the navigation bar
Pressing the original 3 buttons is ok but pressing the new sensor link the response is
“This page does not work. HTTP error 500”
Dragging the “sensor.html” file to the browser shows a normal response.
What do I miss??
Kind regards
Kurt Kristensen

4 Answers
0 Vote Up Vote Down
Kurt Kristensen answered 1 year ago

the cod does not shows properly in my question
hope this is better!

ESP Web Server

Sensor
Outputs
Sensors
About

0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

Hi.
Have you taken a look at the JavaScript console when you try to access that page?
Usually, it provides more information that is useful for debugging.
Regards,
Sara

0 Vote Up Vote Down
Kurt Kristensen answered 1 year ago

Hi
I solved the problem myself!!
the reason is that all the file references need the complete http file name meaning.
<a href=”sensor”>Sensor</a> is not enough.
it should be
<a href=”sensor.http”>Sensor</a>
I wonder why both “sensors and outputs” does not need the complete file name???
kind regards
Kurt Kristensen 

0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

Hi.
Yes, that’s weird.
In theory, it should have behaved the same way as the other files …
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.