Hi
1. I found a website "http://www.gahooyoogle.com" which is a search engine and fetches result from both yahoo and google.
2. I tried to develop a similar one but with more simpler and i choose(Hakia, AltaVista and Google) as my search engines. I developed a html(MySearchPage.html) with textbox and submit button, when search term entered and clicking on submit button it calls a perl file.
3. In perl file the window is first separated to two rows, first row again calls the html file(MySearchPage.html) and second row is separated to three columns.
These three columns contains the results of the search engines.
4. Now i am entering the new search term in the first frame which contains the html file(MySearchPage.html) and the results are displayed in the same frame. But i need the results to be displayed in the second set of three frames without affecting the first frame, the first frame should always contain the html file only
HTMLCode(MySearchPage.html):
<html>
<body>
<form method="post" action="http://localhost:8080/cgi-bin/Searchengines.pl">
<input type="text" name="q" size="50"/>
<input type="submit" name="sbm" text="Submit"/>
</form>
</body>
</html>
PerlCode(Searchengines.pl):
#!C:/Perl/bin/perl -wT
use strict;
use CGI qw/:standard/;
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
my $searchterm;
if(param('q'))
{
$searchterm = param('q');
}
print header;
print "<html>";
print "<frameset rows='10%,*'>";
print "<frame src='http://localhost:8080/MySearchPage.html' scrolling='no' noresize/>";
print "<frameset cols='35%,35%,*'>";
print "<frame src='http://www.hakia.com/?q=".$searchterm."'/>";
print "<frame src='http://www.altavista.com/sites/search/web?q=".$searchterm."'/>";
print "<frame src='http://www.google.com/search?q=".$searchterm."'/>";
print "</frameset>";
print "</frameset>";
print "</html>";
I am using WindowsXP and perl5.8.8
- Freedolen