html - Can't read JSON file from internet with javascript -
for project ned able users facebook id. have done quite bit of searching cannot find works me. here have right now, looks me should work white screen says document cannot found on server. great! , before ask, yes new javascript, have done little reading on , jumping it.
<script> var user = document.getelementbyid("username").value; var script = $.getjson("http://graph.facebook.com/' + user", function(data) { var id = data.id[i]; document.getelementbyid("usernameid").value=id; }); </script> <form action="script" id="form1"> <input id="username" name="username" type="text" placeholder="username" /> <input name="submit" type="submit" value="submit form" /></form> <input id="usernameid" name="usernameid" type="text" />
Comments
Post a Comment