Prev | Current Page 782 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

startsWith(text, last.substr(0, min)))
{
var cnx = new haxe.Http(serviceurl);
cnx.onData = loadList;
421
Chapter 14: More Interactive Content with JavaScript
cnx.setParameter(???start??™, text.substr(0, min));
cnx.request(false);
}
last = text;
}
private function loadList(data : String)
{
colors = ColorsUtil.fromXml(data);
refreshTags(false);
}
private function refreshTags(skipSelect : Bool)
{
if(colors == null || input.value == ?????™)
return;
var filtered = ColorsUtil.filterByName(input.value, colors);
eltags.innerHTML = ?????™;
var self = this;
for(color in filtered)
{
var tag = cast js.Lib.document.createElement(???a???);
untyped tag.onclick = function(e) {
self.selectColor(color);
return false;
};
tag.innerHTML = ??? < span style=???background-color:??™+
color.hex+??™??? > & nbsp; & nbsp; & nbsp; < /span > & nbsp;??™+color.name;
eltags.appendChild(tag);
if(color != filtered.last())
eltags.appendChild(untyped js.Lib.document.createTextNode(???, ???));
}
if(!skipSelect & & filtered.


Pages:
770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794