opensearch with javascript


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function addEngine()
  2. {
  3. var xml_url = 'http://opensearch.xml.url/opensearch.xml';
  4. var img_url = 'http://opensearch.image.url/opensearch.gif';
  5. var name = 'OpenSearch';
  6. if (typeof window.sidebar.addSearchEngine != 'undefined')
  7. window.sidebar.addSearchEngine(xml_url, img_url, name, 'General');
  8. else if (typeof window.external.AddSearchProvider != 'undefined')
  9. window.external.AddSearchProvider(xml_url);
  10. }

URL: http://blog.connor.hu/2009/12/02/opensearch-es-javascript/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.