function initApiPanel() { apiPanel = new YAHOO.widget.Panel("win", { //modal:true, underlay:"shadow", close:true, visible:false }); apiPanel.setHeader("autocomplete API test"); apiPanel.setBody(""); apiPanel.render(document.body); } function apiTest(elInput, sPath) { if ( elInput ) { var search = YAHOO.util.Dom.get(elInput).value; apiRequest(sPath, search); } else { apiRequest(sPath, ""); } }; function apiRequest(sPath, sSearchString) { var sLink = sPath; if ( sSearchString != "" ) { if ( sSearchString.substr(1)!="?") { sSearchString = "?"+sSearchString; } var params = new PageQuery(sSearchString); sLink = sLink + params.createQueryString(true)+"&indent=true"; } function successHandler(oResponse) { sHTML = "
"
sHTML += oResponse.responseText;
sHTML += "