0

I'm trying to use w3data.js for an all html website. The goal is to limite copy past from page to page by adding html includes.

In my case i've created an index.html who looks like this :

   <!DOCTYPE html>
   <html lang="fr">

   <meta http-equiv="content-type" content="text/html;charset=UTF-8" />

   <head>

   <script src="http://www.w3schools.com/lib/w3data.js"></script>
   </head>
   <body id="home">

    <div w3-include-html="header-home.html"></div> <!-- to call a bootstrap navbar -->

   <script>
   w3IncludeHTML();
   </script>

   </body>

I followed the W3 how to: http://www.w3schools.com/howto/howto_html_include.asp but it doesn't work for me.
In my console, I have an error. My website https://minutedrone.com is secure (https), but w3schools.com is not, so iIcan't change the script.
It works when I go on the http version of my website (www.w3schools.com don't have a https version).

What can I do to fix this issue, or is there other way to do what I want?

Please help. Thanks !!

Ricardo Pontual
  • 3,629
  • 3
  • 26
  • 40
  • I'm not going to lie-- I've never heard of the `w3-include-html` and I'm having a difficult time finding any documentation about it... – Alexander Nied Oct 25 '16 at 15:22
  • thanks anied _ someone suggested this methode in a topic here http://stackoverflow.com/questions/8988855/include-another-html-file-in-a-html-file and it work pretty well in http but the issue here is to use this in https .. – Aymen AHMED Oct 25 '16 at 15:28
  • OK, looking now, I see this is not a native attribute, but something provided by the script. I understand the issue now. – Alexander Nied Oct 25 '16 at 15:35

1 Answers1

0

You can:

Community
  • 1
  • 1
Quentin
  • 800,325
  • 104
  • 1,079
  • 1,205
  • Thanks @Quentin will go for the first option (hosting the JS) until i learn the methods you suggested in your post. – Aymen AHMED Oct 31 '16 at 15:38