I have a home page where there is a menu that opens dialogs. Today everything is in a html only, but I would like to separate it, ie unlink and leave this html from the dialog separated from the home page .
I have a home page where there is a menu that opens dialogs. Today everything is in a html only, but I would like to separate it, ie unlink and leave this html from the dialog separated from the home page .
If you do not want to import the js from w3schools to use the "w3-include-html" attribute that Patricia mentioned, you can do this using <iframe>
of the same html. Or even use a programming language to do the "include" of a separate file (php or .NET for example) which I particularly think is advisable.
Hugs!
Hello, you can do this using JQuery, using the load function.
Example:
$(document).ready(function() {
$('#modal').load('modal.html');
});
Hugs ...
You can use the w3-include-html attribute. Example taken from link :
<!DOCTYPE html>
<html>
<script src="https://www.w3schools.com/lib/w3.js"></script><body><divw3-include-html="content.html"></div>
<script>
w3.includeHTML();
</script>
</body>
</html>