In my HTML code I have a link to PDF file named: instructions_A.pdf
The letter 'A' will alternate every now and then.
I was wondering if I could link to the file as long as the filename contains 'instructions_'. And if I could 'retrieve' the rest of the filename.
Is there something possible like:
HTML
<div id="divid"></div>
JS
var linktext = 'instructions_'
var link = '<a id="linkID" href="instructions_?.pdf" target="_blank">' + linktext + '</a>';
document.getElementById("divid").innerHTML = link;
And than checking if the href contains 'instructions_' if so: open that file and ignore the ?.