I have the following at the top of my JS code (it's vanilla JS, no libs used)
var parameters = location.search.substring(1).split("&");
var temp = parameters[0].split("=");
l = unescape(temp[1]);
temp = parameters[1].split("=");
p = unescape(temp[1]);
document.getElementById("page").innerHTML = l;
var imsrc = '../js/' + l + '.js';
import sources from imsrc;
The issue is that I am trying to pass the imsrc parameter in to the import and I'm getting an error (Uncaught SyntaxError: missing module specifier after 'from' keyword) returned in the webtools
What am I doing wrong and how can I fix it? Sorry, newbie question.