I need to be able to add a link element to the head element through a separate file then the file containing the head element. My attempt was as follows:

Code:
document.getElementsByName("head").innerHtml += "<link rel=\"image_src\" href=\"<?php echo $img;?>\"/>";