Jump to content
xisto Community
atoz

Free Search Engine

Recommended Posts

Cool thanks !!! I need one of those :)

Share this post


Link to post
Share on other sites

This bit of code creates a little form on your page; 1 field where you can choose a search engine, another field where you enter the text. And ofcourse a button 'search'. The script is partly Dutch but the smart ones probably will figure it out <_< .

                              <script>[br]function n(naam, statnaam){[/br]        top.location.href=naam;[br]}[/br]function addplus(items){[br]   var plussed = "";[/br]   for (var t = 1; t <= items.length; t++) [br]      {[/br]      if (items.substring(t-1,t) == " ") [br]         {  plussed+="+";  }[/br]      else [br]         {[/br]             if (items.substring(t-1,t) == "+") [br]             {  plussed+="%2B";  }[/br]         else [br]                 { plussed+=items.substring(t-1,t); }[/br]                  }[br]      }[/br]   return plussed;[br]}[/br]function doSearch(){[br]   var words;[/br]   words = document.searchforit.query.value;[br]   var searchitems;[/br]   searchitems=addplus(words);[br]   var index;[/br]   index = document.searchforit.service.selectedIndex;[br]   var site;[/br]   site = document.searchforit.service.options[index].value;[br]   site+=searchitems;[/br]   if (notEmpty(searchitems))   [br]   {[/br]   n(site, ('searchengine' + index + '.htm'));[br]     }[br]}[/br]function notEmpty(word){[/br]   if (word == "" || word == null) [br]   {[/br]      alert("\nYou have to enter some text,\n\nbefore clicking on 'Search'"); [br]      document.searchforit.query.focus();  [/br]      return false;[br]   }[/br]   else [br]   {[/br]   return true;[br]   }[/br]}[br][/br]</script> </font><form[br]        action="javascript:doSearch();void(0)//" method="get"[/br]        name="searchforit" target="_self">[br]            <p><font color="#000000"><select name="service"[/br]            size="1">[br]                <option selected[/br]                value="http://http://nl.search.yahoo.com/?fr=altavista;                <option[/br]                value="http://http://de.ask.com/?o=0&l=dir Jeeves</option>[br]                <option value="http://nl.excite.com/search.gw?s=">Excite</option>[/br]                <option value="http://http://www.hotbot.com/?mt;                <option[/br]                value="http://http://www.ilse.nl/?COMMAND=search_for&LANGUAGE=NL&PROFILE=st&FAMILY=no&SEARCH_FOR;                <option[/br]                value="http://www2.infoseek.com/Titles?qt=">Infoseek</option>[br]                <option[/br]                value="http://http://www.lycos.com/?adv=0&query;                <option[/br]                value="https://www.zoo.com/;                <option[/br]                value="http://http://www.mybegin.nl/search/?action=Search&cat=World%2FNederlands%2F&all=no&query;                <option value="http://forums.xisto.com/no_longer_exists/;                <option[/br]                value="http://zoeken.track.nl/Raven?sm=1&st=1&pl=10&qr=">Track</option>[br]                <option[/br]                value="http://search.yahoo.com/bin/search?p=">Yahoo</option>[/br]            </select>   <br>[br]            <input type="text" size="10" name="query"> <input[/br]            type="button" value="Search" onclick="doSearch()"></font></p>[br]        </form>[/br]</script

Share this post


Link to post
Share on other sites

I've just found another javascript from JavaScriptKit.com that will let the visitors search your site with Google. The code you need is here:

<script type="text/javascript">[/br][br]// Google Internal Site Search script- By JavaScriptKit.com (http://www.javascriptkit.com/'>http://http://www.javascriptkit.com/ For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/'>http://http://www.javascriptkit.com/ This notice must stay intact for use[/br][br]//Enter domain of site to search.[/br]var domainroot="http://www.javascriptkit.com/ Gsitesearch(curobj){[br]curobj.q.value="site:"+domainroot+" "+curobj.qfront.value[/br]}[br][/br]</script>[br][/br][br]<form action="https://www.google.com/search&%2334; method="get" onSubmit="Gsitesearch(this)">[br][/br]<p>Search JavaScript Kit:<br />[/br]<input name="q" type="hidden" />[br]<input name="qfront" type="text" style="width: 180px" /> <input type="submit" value="Search" /></p>[br][/br]</form>[br][/br]<p style="font: normal 11px Arial">This free script provided by<br />[/br]<a href="http://www.javascriptkit.com/'>http://http://www.javascriptkit.com/ Kit</a></p>

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.