javascript, forms, and popups

Discussion in 'HTML' started by John D., May 31, 2004.

  1. John D.

    John D. Guest

    I changed the 'options' in this freeware script to do about 3 google
    searches of a particular public database. The 3 searches are based on a key
    word or phrase that is added by the user, and 4 or 5 keywords that are
    permanently added into a variation of the original google search string.

    I am happy with it, except:
    - I'd prefer it did a pop up window instead of change the page.
    - A minor issue is after I hit the back button sometimes it saves the
    keyword, and sometimes it doesn't.
    - and what is suzi.js ?

    original shareware script:
    http://javascript.internet.com/navigation/one-click-multi-engine-search.html

    Below is the original script if anyone wants to make a suggestion.

    Thanks,
    John D.

    ----------------------------------------------------------------------------
    ---------------
    <BODY>

    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->
    <!-- Original: Pascal Junger ( ) -->
    <!-- Web Site: http://atopqualitysite.com/ -->
    <script language="JavaScript" src="suzi.js" type="text/javascript">
    </script>
    <script language="JavaScript" type="text/javascript">

    //<![CDATA[

    <!--

    function startSearch(){searchString =
    document.searchForm.searchText.value;if(searchString != ""){searchEngine =
    document.searchForm.whichEngine.selectedIndex + 1;finalSearchString = "";

    if(searchEngine == 1){finalSearchString = "http://yourUrlgoeshere.com";}

    if(searchEngine == 2){finalSearchString =
    "http://www.aesop.com/cgi-bin/search/search.cgi?q=" + searchString;}

    if(searchEngine == 3){finalSearchString =
    "http://altavista.digital.com/cgi-bin/query?pg=q&what=web&fmt=d&q=" +
    searchString;}

    if(searchEngine == 4){finalSearchString =
    "http://atopqualitysite.com/cgi-bin/search/search.pl?Terms=" +
    searchString;}

    if(searchEngine == 5){finalSearchString =
    "http://www.galaxy.com/cgi-bin/query?keys=" + searchString;}

    if(searchEngine == 6){finalSearchString = "http://www.google.com/search?q="
    + searchString + "&btnG=Google+Search";}

    if(searchEngine == 7){finalSearchString =
    "http://www.icyspicy.com/cgi-bin/search/search.cgi?keywords=" +
    searchString;}

    if(searchEngine == 9){finalSearchString =
    "http://www.lycos.com/cgi-bin/pursuit?query=" + searchString +
    "&backlink=639";}

    if(searchEngine == 8){finalSearchString =
    "http://search.mamma.com/Mamma?query=" + searchString + " method=GET";}

    if(searchEngine == 10){finalSearchString =
    "http://search.yahoo.com/bin/search?p=" + searchString;}

    if(searchEngine == 11){finalSearchString =
    "http://search.gallery.yahoo.com/search/corbis?p=" + searchString +
    "&r=all";}

    if(searchEngine == 12){finalSearchString =
    "http://www.gamedex.com/find.cgi?string=" + searchString;}

    if(searchEngine == 13){finalSearchString =
    "http://download.cnet.com/downloads/1,10150,0-10000-103-0-1-7,00.html?tag=sr
    ch&qt=" + searchString + "&cn=&ca=10000";}

    if(searchEngine == 14){finalSearchString =
    "http://hotfiles.zdnet.com/cgi-bin/texis/swlib/hotfiles/search.html?Usrt=rel
    &Usrchtype=simple&Utext=" + searchString;}

    if(searchEngine == 15){finalSearchString =
    "http://dk.altavista.com/q?pg=q&q=" + searchString +
    "&kl=XX&what=dk&search.x=26&search.y=11";}

    if(searchEngine == 16){finalSearchString =
    "http://dk.search.yahoo.com/search/dk?p=" + searchString;}

    if(searchEngine == 17){finalSearchString =
    "http://de.altavista.com/q?pg=q&q=" + searchString +
    "&kl=XX&what=de&search.x=26&search.y=11";}

    if(searchEngine == 18){finalSearchString =
    "http://de.search.yahoo.com/search/de?p=" + searchString;}location.href =
    finalSearchString;}}// -->

    //]]>

    </script>



    <form name="searchForm"><b>Find</b> <input name="searchText"

    type="text" /> <b>with</b> <select name="whichEngine"

    onchange="startSearch()">

    <option selected="selected">Select / Reset</option>

    <option>Aesop</option>



    <option>Altavista</option>

    <option>Awards & Topsites</option>

    <option>Galaxy</option>

    <option>Google</option>

    <option>IcySpicy</option>

    <option>Lycos</option>

    <option>Mamma</option>

    <option>Yahoo!</option>



    <option>Yahoo (PixSearch)</option>

    <option>Games - GameDex</option>

    <option>Software - CNet Downloads</option>

    <option>Software - Hotfiles ZDNet</option>

    <option>Denmark - AltaVista (DK)</option>

    <option>Denmark - Yahoo (DK)</option>

    <option>Deutschland - Altavista (DE)</option>

    <option>Deutschland - Yahoo (DE)</option>

    </select></form>



    <p><center>

    <font face="arial, helvetica" size"-2">Free JavaScripts provided<br>

    by <a href="http://javascriptsource.com">The JavaScript Source</a></font>

    </center><p>
     
    John D., May 31, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. [mfk]
    Replies:
    0
    Views:
    376
    [mfk]
    Oct 18, 2007
  2. Moe Sisko
    Replies:
    1
    Views:
    857
    George
    Aug 4, 2008
  3. Replies:
    3
    Views:
    187
    Dheeraj Gambhir
    Jul 30, 2009
  4. Bob Wightman

    Popups and javascript

    Bob Wightman, May 28, 2004, in forum: Javascript
    Replies:
    1
    Views:
    88
    Hywel
    May 28, 2004
  5. Raffi
    Replies:
    3
    Views:
    131
Loading...

Share This Page