Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Js Hyper Search
maddog39
post Feb 21 2005, 06:18 AM
Post #1


Super Member
*********

Group: Members
Posts: 208
Joined: 27-January 05
From: LI, New York
Member No.: 3,448



Hello all,

I found a Javascript hyper searcher on another website that can search all the major search enignes and then display all of teh results in one single page. Its really cool and if you would like to view a demo then just click here. Its all set up for you there and if you just want the code then here it is. wink.gif biggrin.gif

CODE

<script>
Yahoo = "http://search.yahoo.com/bin/search?p=";
Alta = "http://www.altavista.digital.com/cgi-bin/query?pg=q&what=web&q=";
Open = "http://search.opentext.com/omw/simplesearch?SearchFor=";
Lycos = "http://www.lycos.com/cgi-bin/pursuit?query=";
Crawler = "http://www.webcrawler.com/cgi-bin/WebQuery?searchText=";
InfoSeek = "http://guide-p.infoseek.com/Titles?qt=";
DejaNews = "http://search.dejanews.com/nph-dnquery.xp?query=";
Inktomi = "http://204.161.74.8:1234/query/?query=";
MetaCrawler = "http://metacrawler.cs.washington.edu:8080/htbin-post/nph-metaquery.p?general=";
SavySearch = "http://guaraldi.cs.colostate.edu:2000/search?KW=";
Excite = "http://www.excite.com/search.gw?searchType=Concept&search=";
Magellan = "http://www.mckinley.com/searcher.cgi?query=";
Point = "http://point.lycos.com/cgi-bin/pursuit?query=";
Galaxy = "http://www.einet.net/cgi-bin/wais-text-multi?keywords=";
var got=0;
var url = "";
var plus="";
var mag="";

function search4(item){
      stringPlus();
      resultsWindow=window.open();
      resultsWindow.document.open();
      resultsWindow.document.write("<head><title>Close this window to return to Total Search</title></head>");
resultsWindow.document.write("<FRAMESET ROWS=50%,50%><FRAMESET COLS=50%,50%><FRAME NAME='frame0' SRC='" + computeFrameSrc(0) + "'><FRAME NAME='frame1' SRC='" + computeFrameSrc(1) + "'></FRAMESET>");
      resultsWindow.document.write("<FRAMESET COLS=50%,50%><FRAME NAME='frame2' SRC='" + computeFrameSrc(2) + "'><FRAME NAME='frame3' SRC='" + computeFrameSrc(3) + "'></FRAMESET></FRAMESET>");
      resultsWindow.document.close();
      got = 0;
}

function search2(item){
      stringPlus();
      resultsWindow=window.open();
      resultsWindow.document.open();
      resultsWindow.document.write("<head><title>Close this window to return to Total Search</title></head>");
resultsWindow.document.write("<FRAMESET ROWS=50%,50%><FRAME NAME='frame0' SRC='" + computeFrameSrc(0) + "'><FRAME NAME='frame1' SRC='" + computeFrameSrc(1) + "'></FRAMESET>");
      resultsWindow.document.close();
      got = 0;
}

function stringPlus(){
      for (var j=0; j < window.document.choose4.text.value.length; j++){
              if (window.document.choose4.text.value.charAt(j) == " ")
                      mag += "+";
              else
                      mag += window.document.choose4.text.value.charAt(j);}
}

function numChecked(item){
      plus = escape(item.text.value);
      var h=0;
      num=0;
      for (var l=0; l < item.check1.length; l++) {
              if (item.check1[l].checked){
                              h++;
                      if (h++ <= 4){
                              if (l == "0"){
                                       num = 1;}
                              else if (l == "1"){
                                      num = 2;}
                              else if (l == "2"){
                                      num = 3;}
                              else if (l == "3"){
                                      num = 4;}
                              else if (l == "4"){
                                      num = 5;}
                              else if (l == "5"){
                                      num = 6;}
                              else if (l == "6"){
                                      num = 7;}
                              else if (l == "7"){
                                      num = 8;}
                              else if (l == "8"){
                                      num = 9;}
                              else if (l == "9"){
                                      num = 10;}
                              else if (l == "10"){
                                      num = 11;}
                              else if (l == "11"){
                                      num = 12;}
                              else if (l == "12"){
                                      num = 13;}
                              }
              }
      }
      if (h == 2)
              Results(num-1);
      else if (h == 4)
              search2(item);
      else
              search4(item);
}

function computeFrameSrc(num){
      var k=-1;
      for (var j=got; j < document.choose4.check1.length; j++) {
              if (document.choose4.check1[j].checked){
                              k++;
                      if (k++ <= num){
                              if (j == "0"){
                                      url = Yahoo + plus;
                                      got = 1;}
                              else if (j == "1"){
                                      url = Magellan + mag;
                                      got = 2;}
                              else if (j == "2"){
                                      url = Point + plus;
                                      got = 3;}
                              else if (j == "3"){
                                      url = Alta + plus + "&mode=and";
                                      got = 4;}
                              else if (j == "4"){
                                      url = Open + plus + "&mode=and";
                                      got = 5;}
                              else if (j == "5"){
                                      url = Lycos + plus + "&backlink=217&maxhits=25";
                                      got = 6;}
                              else if (j == "6"){
                                      url = Excite + plus + "&category=default&mode=relevance&showqbe=1&display=html3,hb";
                                      got = 7;}
                              else if (j == "7"){
                                      url = Crawler + plus + "&maxHits=25";
                                      got = 8;}
                              else if (j == "8"){
                                      url = InfoSeek + plus + "&col=WW";
                                      got = 9;}
                              else if (j == "9"){
                                      url = DejaNews + plus + "&defaultOp=AND&svcclass=dncurrent&maxhits=25";
                                      got = 10;}
                              else if (j == "10"){
                                      url = Inktomi + plus + "&hits=25&disp=Text+Only";
                                      got = 11;}
                              else if (j == "11"){
                                      url = MetaCrawler + plus + "&logic=0Žion=The+World&orgType=Any&maxwait=1&score=0";
                                      got = 12;}
                              else if (j == "12"){
                                      url = SavySearch + plus + "&classic=on&t1=x&Boolean=AND&Hits=10&Mode=MakePlan&df=normal&AutoStep=on&AutoInt=on&lb=1";
                                      got = 13;}
                              return url;
                              }
              }
      }
      url = "http://members.xoom.com/mp_home/empty.htm";
      return url;
}

function Results(place){
      stringPlus();
      resultsWin = open("","results");
      if (place == "0")
              url = Yahoo + plus;
      else if (place == "1")
              url = Magellan + mag;
      else if (place == "2")
              url = Point + plus;
      else if (place == "3")
              url = Alta + plus + "&mode=and";
      else if (place == "4")
              url = Open + plus + "&mode=and";
      else if (place == "5")
              url = Lycos + plus + "&backlink=217&maxhits=25";
      else if (place == "6")
              url = Excite + plus + "&category=default&mode=relevance&showqbe=1&display=html3,hb";
      else if (place == "7")
              url = Crawler + plus + "&maxHits=25";
      else if (place == "8")
              url = InfoSeek + plus + "&col=WW";
      else if (place == "9")
              url = DejaNews + plus + "&defaultOp=AND&svcclass=dncurrent&maxhits=25";
      else if (place == "10")
              url = Inktomi + plus + "&hits=25&disp=Text+Only";
      else if (place == "11")
              url = MetaCrawler + plus + "&logic=0Žion=The+World&orgType=Any&maxwait=1&score=0";
      else if (place == "12")
              url = SavySearch + plus + "&classic=on&t1=x&Boolean=AND&Hits=10&Mode=MakePlan&df=normal&AutoStep=on&AutoInt=on&lb=1";
      resultsWin.location = url;
}
</SCRIPT>

<FONT SIZE=+1>Total Search</FONT>

<P>
This script will runn the same search across all of
the major search engines at one time.<P>


<FORM NAME="choose4" ACTION="javascript:numChecked(document.choose4) //">
<P>
<FONT SIZE=4><B>Search and display 1-4 databases simultaneously:</B></FONT><BR>
<TABLE><TR><TD><B><A HREF="temp.html">Directories</A></B><BR>
<INPUT TYPE="checkbox" NAME="check1" VALUE="Yahoo"
              ONCLICK="choose4.check1.value='Yahoo'">Yahoo<BR>

<INPUT TYPE="checkbox" NAME="check1" VALUE="Magellan"
              ONCLICK="choose4.check1.value='Magellan'">Magellan<BR>

<INPUT TYPE="checkbox" NAME="check1" VALUE="Point"
              ONCLICK="choose4.check1.value='Point'">Point<BR><BR></TD>

<TD WIDTH="15"></TD>

<TD><B><A HREF="temp.html">Search Engines</A></B><BR>
<INPUT TYPE="checkbox" NAME="check1" VALUE="Alta"
              ONCLICK="choose4.check1.value='Alta'">Alta Vista<BR>

<INPUT TYPE="checkbox" NAME="check1" VALUE="Open"
              ONCLICK="choose4.check1.value='Open'">Open Text<BR>

<INPUT TYPE="checkbox" NAME="check1" VALUE="Lycos"
              ONCLICK="choose4.check1.value='Lycos'">Lycos<BR>

<INPUT TYPE="checkbox" NAME="check1" VALUE="Excite"
              ONCLICK="choose4.check1.value='Excite'">Excite<BR></TD>

<TD><BR><INPUT TYPE="checkbox" NAME="check1" VALUE="Crawler"
              ONCLICK="choose4.check1.value='Crawler'">Webcrawler<BR>

<INPUT TYPE="checkbox" NAME="check1" VALUE="InfoSeek"
              ONCLICK="choose4.check1.value='InfoSeek'">InfoSeek<BR>

<INPUT TYPE="checkbox" NAME="check1" VALUE="DejaNews"
              ONCLICK="choose4.check1.value='DejaNews'">DejaNews<BR>

<INPUT TYPE="checkbox" NAME="check1" VALUE="Inktomi"
              ONCLICK="choose4.check1.value='Inktomi'">Inktomi<BR>
</TD>
<TD WIDTH="15"></TD>
<TD><B><A HREF="temp.html">Meta Searches</A></B><BR>
<INPUT TYPE="checkbox" NAME="check1" VALUE="MetaCrawler"
              ONCLICK="choose4.check1.value='MetaCrawler'">MetaCrawler<BR>

<INPUT TYPE="checkbox" NAME="check1" VALUE="SavySearch"
              ONCLICK="choose4.check1.value='SavySearch'">SavySearch<BR><BR><BR>
</TD></TR></TABLE>
<P>
<B>Enter text to find</B>:<BR>
<INPUT TYPE="text" NAME="text" SIZE=30>
<INPUT TYPE="submit" NAME="send" VALUE="Search">
<INPUT TYPE="reset" NAME="clear" VALUE="Clear All">
</FORM>
<script>
</SCRIPT>
Go to the top of the page
 
+Quote Post
nancmu
post Feb 23 2005, 04:46 AM
Post #2


Advanced Member
*******

Group: Members
Posts: 136
Joined: 20-October 04
From: Thailand
Member No.: 1,840



Thank, that code is very useful smile.gif . I learned from your code tongue.gif.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Secrets To Getting To The Top Of Google(46)
  2. The Search Engine At Blogger.com(4)
  3. Search Engine That Pays U 4 Searching(11)
  4. Microsoft Search Engine(20)
  5. Search Engine Optimisation(0)
  6. Are You In Search Of Free Google Cash Program ?(11)
  7. Multilingual Search Engine Optimization(3)
  8. How To Detect And Remove Mp3 Duplicates(14)
  9. Forget About 0.01 Per Click, Get 0.06 Per Search!(15)
  10. Perl For Automated Web Form Search(1)
  11. Greetings To All(1)
  12. What Kinda Stuff Do You Search For On Google?(10)
  13. Make Money Searching The Internet(0)
  14. Does Duplicate Content Affects Search Engine Positions ?(1)
  15. How To Make A Search Form And Php Code?(10)
  1. How Long Does It Take To Get Listed In Search Engines(3)
  2. Get Paid For Searching The Internet!(4)
  3. Effective Search Over Web(0)
  4. Custom Search Engine For Website(8)
  5. Search For Video Files And Display Them(0)
  6. Free Search Engine To Search Your Website(7)
  7. Windows Live Image Search(0)
  8. Google Vs *other Search Engine*(37)
  9. Google Adsense Search Option Not Working(0)
  10. Spybot Search & Destroy(3)
  11. Domain Name Hyperlinking Question?(2)
  12. What Is The Best Screen Recorder?(5)
  13. New Search Engine! Similar To Google!~(10)
  14. Which is a better search engine?Google or Yahoo(63)
  15. Search Engine Optimization Tools(11)


 



- Lo-Fi Version Time is now: 7th October 2008 - 09:15 AM