showSearchResults by the remote script:showSearchResults : function(result) { $.r.innerHTML = ''; if (result.ResultSet) { for (var i = 0; i < result.ResultSet.Result.length; i++) { var dt = document.createElement('dt'); var a = document.createElement('a'); a.href = result.ResultSet.Result[i].Url; a.target = '_vu'; a.innerHTML = result.ResultSet.Result[i].Title; dt.appendChild(a); $.r.appendChild(dt); var dd = document.createElement('dd'); dd.innerHTML = result.ResultSet.Result[i].Summary; $.r.appendChild(dd); } } }Here we're using
innerHTML to clear whatever search results might already be on the screen. Then we loop through the results, create dt and dd nodes to hold titles and descriptions, and link the titles to the appropriate URLs.prev - http://kentbrewster.com/build-a-search-app/code/code6.html - next