• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 193
  • Last Modified:

Web Search Page

Hi Guys,

Can some one tell me how I can create a web search page on my website.
I would prefer if I could split off the top 20% of the page to be used for the search options.
And the bottom 80% or so to be used to display the results.
If you know what I mean,

THanks guys.
  • 4
  • 2
1 Solution

1- Create a new page and save it as SearchWeb.asp
2- Insert a form with one text box and one drop down.
3- Name the textbox as TextSearch
4- Name the Drop Down as Engine
5- The HTML of the form with the textbox and the drop down is as follows:

<p>Search the Web</p>
<form method="POST" action="GoToPage.asp">
  Search for: <input type="text" name="TextSearch" size="53"></p>
  <p>Select Engine:<select size="1" name="Engine">
  <option selected value="Select">Select</option>
  <option value="Google">Google</option>
  <option value="Alta Vista">Alta Vista</option>
  <option value="Lycos">Lycos</option>
  <option value="Ask Jeeves UK">Ask Jeeves UK</option>
  <option value="Ask Jeeves US">Ask Jeeves US</option>
  <option value="Yahoo">Yahoo</option>
  <p><input type="submit" value="Search" name="B1"><input type="reset" value="Clear" name="B2"></p>

6- Save the page.
7- Go under the form and click once
8- Go to Insert/Inline Fame
9- Click once inside it then right click and select inline frame properties.
10- Set the inline frame properties as follows:

Name= ShowResults

Frame Size:
Width= 748 In Pixles
Height= 2598 in Pixles

Width 12 Pixles
Height 16 Pixles

Show Border (uncheck) we do not want the borders

Scrollbars   Select (Never)

Alignment    Select default

11- Click on then Right Click the form  and select Form properties
12- In Target Frame click the button
13- Select ShowResults
14- Click OK then OK again
15- Save the page

1- Create a new page and save it as GoToPage.asp
2- Switch to HTML View and clear the HTML code leaving the page blank
3- Insert the following Code:

Option Explicit

Dim strChoice, strTextSearch


if strChoice="Google" then
          response.redirect "http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q="+strTextSearch
     elseif strChoice="Yahoo" then
          response.redirect "http://search.yahoo.com/bin/search?p="+strTextSearch
     elseif strChoice="Alta Vista" then
          response.redirect "http://www.altavista.com/web/results?q="+strTextSearch+"&kgs=0&kls=1&avkw=qtrp"
     elseif strchoice="Lycos" then
          response.redirect "http://search.lycos.com/default.asp?lpv=1&loc=searchhp&tab=web&query="+strTextSearch
     elseif strchoice="Ask Jeeves UK" then
          response.redirect "http://www.ask.co.uk/reply.asp?ask="+strTextSearch
     elseif strChoice="Ask Jeeves US" then
          response.redirect "http://www.ask.com/main/askjeeves.asp?ask="+strTextSearch    
end if


4- Save the page
5- Go back to the SearchWeb.asp and right click the form then select properties.
6- Select Send to Other
7- Click Options
8- Type GoToPage.asp in the Action Box
9- Click OK then OK
10- Save the form

Open the form in your browsers,  type your search in the box and then select the engine and click the search button.


Another suggestion is to use the Select Statement instead of the Elseif:

Select Case strChoice
  Case "Google"
    response.redirect "http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q="+strTextSearch
  Case "Yahoo"
    response.redirect "http://search.yahoo.com/bin/search?p="+strTextSearch
   Case "Alta Vista"
   response.redirect "http://www.altavista.com/web/results?q="+strTextSearch+"&kgs=0&kls=1&avkw=qtrp"
End Select

Add as more pages as you like.

If you want to use engines that are not mentioned here you have to do the following:

1- Go to the engine itself in your browser. e.g, go to www.infoseek.com, then in the search box search for ASP, then look at the URL, you will see this address:


Delete the word asp after the = sign and put instead of it

so the whole link will look like:

Copy this and go to your case or elseif statment and put it after the response.redirect,  so it will be like:

elseif strchoice="Infoseek" then
response.redirect "http://go.google.com/hws/search?client=disney-go&cof=AH%3Acenter%3BAWFID%3A7e572b45105f192b%3B&q="+strTextSearch

ALSO: Do not forget to add Infoseek to the drop down box.

NOTE: Do these steps with every engine and remove the asp and replace it with the +strTextSearch.  In some engines the =asp will not come at the end,  you might find it in the middle,  like in Altavista's case. If you find it in the middle you replace it with +strTextSearch+ and put " before and after it.  Look in Altavista's example in my code.

Good luck.


pnorris99Author Commented:
Thanks for that I will try it when I get home.
Thanks again,

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

You are wlecome Phil.
pnorris99Author Commented:
Hi there again,
Can you let me me know where the insert / inline frame is in front page, I dont seem to be able to find it.

I tried a few ways of working around this but i couldnt figure it out, kept opening the results in another window, my fault i know.

Thanks again.

In FrontPage 2002 you go to Insert/Inline Frame


Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now