dcsimg

Assignment 26: A Possible Answer

This:






<script language="JavaScript">



function Gofindit(){



alert("Going to Search...");

       var searchfor = document.formsearch.findthis.value;    

{                                

       var FullSearchUrl = "http://webcrawler.com/cgi-bin/WebQuery?searchText=" + searchfor ;

location.href = FullSearchUrl;

}}







</script>







<form name="formsearch">

Search Webcrawler for: <input  name="findthis" type="text">

<input type="button" value="Go Find It" onClick="Gofindit()">

</form>

 

Gives you this:

Search Webcrawler for:

 

     Once you know the address of the search engine, then it should be fairly easy. But how do you get it? All I did was go to a search engine, do a search and copy the address from the Location bar. Ta Da!

     Since you want the alert to pop up before the search occurs, make sure it's first in the run.

 

Did You Get It?

 

Back to the Index Page