473,378 Members | 1,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Need help in Frames

Hi

  1. I found a website "http://www.gahooyoogle.com" which is a search engine and fetches result from both yahoo and Google.
  2. 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 there is a Html code, 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
I believe there are no problems with my perl code and suggest me the proper html coding. I have posted the perl code also which contains html coding.

HTMLCode(MySearchPage.html):
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. <form method="post" action="http://localhost:8080/cgi-bin/Searchengines.pl">
  4. <input type="text" name="q" size="50"/>
  5. <input type="submit" name="sbm" text="Submit"/>
  6. </form>
  7. </body>
  8. </html>
  9.  
PerlCode(Searchengines.pl):
Expand|Select|Wrap|Line Numbers
  1. #!C:/Perl/bin/perl -wT
  2. use strict;
  3. use CGI qw/:standard/;
  4. use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
  5. my $searchterm;
  6. if(param('q'))
  7. {
  8.     $searchterm = param('q');
  9. }
  10. print header;
  11. print "<html>";
  12. print "<frameset rows='10%,*'>";
  13. print "<frame src='http://localhost:8080/MySearchPage.html' scrolling='no' noresize/>";
  14. print "<frameset cols='35%,35%,*'>";
  15. print "<frame src='http://www.hakia.com/?q=".$searchterm."'/>";
  16. print "<frame src='http://www.altavista.com/sites/search/web?q=".$searchterm."'/>";
  17. print "<frame src='http://www.google.com/search?q=".$searchterm."'/>";
  18. print "</frameset>";
  19. print "</frameset>";
  20. print "</html>";
  21.  
I am using WindowsXP

- Freedolen
Aug 17 '07 #1
4 1885
drhowarddrfine
7,435 Expert 4TB
HTML doesn't control any of that so I'm moving this to the Perl forum.
Aug 17 '07 #2
KevinADC
4,059 Expert 2GB
HTML doesn't control any of that so I'm moving this to the Perl forum.
Actually it is an html problem because his html code is wrong for a frameset. The perl script should work, after he corrects the html code. Maybe you can address the problems wth his framset document, like lack of proper DTD and lack of target attributes and any other html concerns.

-Kevin
Aug 17 '07 #3
Hi,

I have solved the issue by adding 'target' and 'name' properties in HTML coding

HTML Modifications:
<form method="post" action="http://localhost:8080/cgi-bin/Searchengines.pl" target="resultframe">
HTML Code Modifications in Perl File:
print "<frame src='http://www.hakia.com/?q=".$searchterm."' name='resultframe'/>";
print "<frame src='http://www.altavista.com/sites/search/web?q=".$searchterm."' name='resultframe'/>";
print "<frame src='http://www.google.com/search?q=".$searchterm."' name='resultframe'/>";

-Freedolen
Aug 28 '07 #4
miller
1,089 Expert 1GB
In an unrelated issue, I suggest that you use HERE documents instead of multiple print statements when working with html:

Expand|Select|Wrap|Line Numbers
  1. print <<"END_OF_HTML";
  2. <html>
  3. <frameset rows='10%,*'>
  4. <frame src='http://localhost:8080/MySearchPage.html' scrolling='no' noresize/>
  5. <frameset cols='35%,35%,*'>
  6. <frame src='http://www.hakia.com/?q=$searchterm'/>
  7. <frame src='http://www.altavista.com/sites/search/web?q=$searchterm'/>
  8. <frame src='http://www.google.com/search?q=$searchterm'/>
  9. </frameset>
  10. </frameset>
  11. </html>
  12. END_OF_HTML
  13.  
- Miler
Aug 30 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Dave Smithz | last post by:
Hi there, I have implemented a login sequence using session variables for a PHP/MySQL DB which I took over development. I read some books and this NG and it seemed straight forward. However the...
2
by: Mekon | last post by:
I have never written a line of script in my life but I need some help with it now. I have this auto generated code which I want to modify if possible The script generates a strip of...
6
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
5
by: Charles Harrison Caudill | last post by:
I've been going through tutorials, APIs, posts on this newsgroup, this newsgroup's faq, etc... I have a function that describes the fields that an object claims to have and I have found what...
4
by: coolsti | last post by:
I am aware of the setInterval and setTimeout functions for Javascript, but I can't seem to find an example that lets me do what I need to. I have a script that needs to wait until a certain...
7
by: David Hayes | last post by:
I tried finding an answer on http://www.quirksmode.org/ without success. I am attempting a complicated Frames structure. I have made it work in IE, but not Netscape. I begin with three...
8
by: heather.memmel | last post by:
I am in no way a scripter/programmer of any kind but I am in charge of a number of online videos. Anyway I need help debugging my javascript which has been pieced together from several other...
2
by: Charles | last post by:
I need some ideas about how I can handle people that bookmark a page in my forms authentication web site. The main page of this web site has four frames, a header, footer, left side (used for a...
2
by: Jim | last post by:
OK....so I got a little off-topic last time....... I still want to do a simple web page like MSDN Library (http://msdn.microsoft.com/library/default.asp) with a couple of changes. On my...
0
by: hinchb | last post by:
I have coded a Non-CSS menu using IFRAMES which I would like your opinion on. It seems to work in all the browsers I've tested. Do you see any disadvantages in using something like this. Here is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.