I have this script to fill a input box from a link, but it loads only value="Autofill successful." and I want something to load dynamic thing like from a php file like get-fill.php?=names
<input type="text" name="name_textbox" id="id_textbox" />
<a onclick="autofill()" href="#">hey</a>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" language="JavaScript">
function autofill(){
var object = document.getElementsByName('name_textbox');
object.item(0).value="Autofill successful.";
}
</script>