Hey everyone,
I have this javascript
function getsomethingelse()
{
//erzeugt den HTML-Code
var string;
string = "<b>This is a site</b>"
//beschafft eine referenz auf das <div> element auf der seite
myDiv = document.getElementById("container");
//lädt Inhalt in das <div> element
myDiv.innerHTML = string;
}
wich is linked by this link
<a href="#" onclick="getsomethingelse()" class="panel">Link</a>
I am searching for a way to - instead of writing the whole HTML document into string= - import an external (HTML) file into this; because it is quite chaotic to write a whole HTML document in a single line.
Can someone help me with this? Thanks a lot in advance, benny