Created
December 13, 2010 20:32
-
-
Save mklabs/739555 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function list_return(return_values){ | |
this.Objects = return_values; | |
function add_li(list, text) { | |
var list = document.getElementById(list); | |
var li = document.createElement("li"); | |
li.innerHTML = text; | |
list.appendChild(li); | |
} | |
for(var i=0; i < return_values.length; i++){ | |
var myObject = JSON.parse(return_values[i].object.replace(/\\\"/g,'"')); | |
console.log(return_values[i].uid+' '+return_values[i].okey); | |
console.log(myObject); | |
add_li('listofobjects', return_values[i].okey+' '+myObject.FirstName+' '+myObject.LastName) | |
} | |
return_values = null; | |
var hack = document.getElementById("TMP2"); | |
document.body.removeChild(hack); | |
} | |
function list(){ | |
var script = document.createElement('script'); | |
script.src = url_serv+"jsonquery.php?callback=list_return&action=getAllObjects&type=human&hack="+((new Date()).getMilliseconds()); | |
console.log(script.src); | |
script.id = "TMP2"; | |
document.body.appendChild(script); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment