View Single Post
Old 02-17-2013, 03:50 PM   PM User | #2
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,461
Thanks: 52
Thanked 457 Times in 455 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
just eyeballing it, I'd say it would be something like this:

Code:
for (i=0; i<items.length; i++){
els = items[i].split("|");
li = document.createElement("li");
li.innerHTML = els[0];
frag.appendChild(li);
li.onclick=function(){
document.getElementById("ajaxName").value=this.innerHTML;
}
}
completely untested, but something like that...
xelawho is offline   Reply With Quote