Permalink
Browse files

Fixes as per feedback - closing UL for Yahoo and encoding query.

  • Loading branch information...
codepo8 committed Dec 11, 2009
1 parent ffe5476 commit a48d5531a84f40b4acd120f3e1da4e14f025b743
Showing with 2 additions and 2 deletions.
  1. +2 −2 multisearch.html
View
@@ -52,11 +52,11 @@
var cur = yahoo.result[i];
yahooout+='<li><h3><a href="'+cur.clickurl+'">'+cur.title+'</a></h3><p>'+cur.abstract+'<span>('+cur.dispurl+')</span></p></li>';
}
- bingout += '</ul>'
+ yahooout += '</ul>'
document.getElementById('yahoo').innerHTML = yahooout;
}
document.getElementById('fm').onsubmit = function(){
- var query = document.getElementById('search').value;
+ var query = encodeURIComponent(document.getElementById('search').value);
var api = 'http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20query.multi%20where%20queries%3D\'select%20content%2Curl%2CtitleNoFormatting%2CvisibleUrl%20from%20google.search%20where%20q%3D%22'+query+'%22%3Bselect%20Title%2CDescription%2CUrl%2CDisplayUrl%20from%20microsoft.bing.web%20where%20query%3D%22'+query+'%22%3Bselect%20abstract%2Cclickurl%2Cdispurl%2Ctitle%20from%20search.web%20where%20query%3D%22'+query+'%22\'&format=json&diagnostics=false&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=mysearch';
var s = document.createElement('script');
s.setAttribute('src',api);

0 comments on commit a48d553

Please sign in to comment.