Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit a48d5531a84f40b4acd120f3e1da4e14f025b743 1 parent ffe5476
Christian Heilmann authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 multisearch.html
4 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);
Please sign in to comment.
Something went wrong with that request. Please try again.