1
I have a menu that I will use on all pages, so I want to upload the content:
I’m doing like this:
<head>
<meta charset="utf-8">
<!-- This file has been downloaded from Bootsnipp.com. Enjoy! -->
<title> </title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="./css/bootstrap.min.css" rel="stylesheet">
<link href="./css/estilo.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="./js/bootstrap.min.js"></script>
<link rel="icon" href="./favicon/favicon.png">
<script>
$("#menu").load("menusistema.html");
</script>
</head>
<body">
<div id="menu"></div>
</body>
You’re not carrying anything, which could be wrong?
It may be that one of your files uploaded on
<script></script>
is in trouble or you are not linking right, then the file does not load.– Leandro Lima
I have tried several options and does not load
– Harry
Open your browser console, edit the question, and paste the errors that the console displayed on your page into it.
– Guilherme Nascimento
@Guilhermenascimento, I added the image, see if you can help me
– Harry
No need to post photo, just have copied the error and pasted in the question. Read: Manual on how NOT to ask questions and Do not post your code or your error message
– Guilherme Nascimento
@Guilhermenascimento, then the error and why is HTML not inside a web server? that error message only appeared because I tried to call the html in the console, the more the screen goes blank when it opens.
– Harry
@itasouza yes, that’s what I said in the reply, Xmlhttprequest (aka ajax) only works on HTTP and HTTPS servers or extensions to Chrome and firefox.
– Guilherme Nascimento