F
fl4v
Guest
Now I know this may sound a little silly but I really can't figure it out.
I have an html tabel where one row changes according to a java script. I usually introduce the new script for the row like this:
var newtext = '<b>My new html inner code! (which is sometimes way longer)</b>';
// caID is the id of the row in the table.
var changeAreaID = document.getElementById('caID');
changeAreaID .innerHTML = newtext;
What I want to know is how to I get the new html code I need from a different file, import it or something, without having to write the html code in the javascript code as strings.
I'm only a beginner at html.
I have an html tabel where one row changes according to a java script. I usually introduce the new script for the row like this:
var newtext = '<b>My new html inner code! (which is sometimes way longer)</b>';
// caID is the id of the row in the table.
var changeAreaID = document.getElementById('caID');
changeAreaID .innerHTML = newtext;
What I want to know is how to I get the new html code I need from a different file, import it or something, without having to write the html code in the javascript code as strings.
I'm only a beginner at html.