Solved

two search engines in one page

Posted on 2001-06-21
7
334 Views
Last Modified: 2006-11-17
Hi

I need to put two search engines in a single page one below the other which works entirely on different logic, the user can go and search but he has to use only one at a time, i have two serch buttons. if he fills up two search engine criteria then the confusion comes.

my problem is, in one html page i can have only one <form> and one post only, how to use for two search engines

any suggestions are welcomed
0
Comment
Question by:ramalingam-s
7 Comments
 
LVL 5

Expert Comment

by:harwantgrewal
ID: 6217049
You can Use logic like this

When you submit the form let the action="getResult.php" and the input name is "GetDate"

This in the page getResult.php get the value of GetDate and include file like this

include "http://www.google.com/q=$GetDate";
include "http://www.altavista.com/q=$GetDate";

check the query address then give a proper location with the query string as $GetData


Harry
0
 
LVL 4

Accepted Solution

by:
ykf2000 earned 50 total points
ID: 6217761
Hi,

you can use javascript for this:


<script language="javascript">
function goSearch(engine)
{
   if(engine==1)
      document.your_form_name.action = "first_search.php";
   else
     document.your_form_name.action = "second_search.php";

   document.your_form_name.submit();
}

<form action="" method="post">
....
...your form elements here
....
<input type="button" value="Search One" onClick="javascript: goSearch(1);">
<input type="button" value="Search Two" onClick="javascript: goSearch(2);">
</form>
0
 
LVL 5

Expert Comment

by:aksteve
ID: 6225052
It actually doesnt matter if they fill in both search engine data as you will only be using what you need from the POST/GET anyways.

You can try and use common variables such as "$search_words" that both search engines can use.

and a drop down or bubbles to pick what search engine they want. Based upon the bubble or dropdown value you will perform that search type..
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Expert Comment

by:Moondancer
ID: 6419158
It's time to clean up this topic area and that means taking care of this question. Your options at this point are:

1. Award points to the Expert who provided an answer, or who helped you most. Do this by clicking on the "Accept Comment as Answer" button that lies above and to the right of the appropriate expert's name.

2. PAQ the question because the information might be useful to others, but was not useful to you. To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.

3.  Ask Community Support to help split points between participating experts.  Just comment here with details.

4.  Delete the question because it is of no value to you or to anyone else.  To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.

If you elect for option 2, 3 or 4, just post comment with details here and I'll take it from there.  We also request that you review any other open questions you might have and update/close them.  Display all your question history from your Member Profile to view details.

PLEASE DO NOT AWARD THE POINTS TO ME.

____________________________________________



Hi Experts:

In the event that the Asker does not respond, I would very much appreciate your opinions as to which Expert ought to receive points (if any) as a result of this question.  Likewise, you can also suggest that I PAQ or delete the question.

Experts, please do not add further "answer" information to this question.  I will be back in about one week to finalize this question.

Thank you everyone.

Moondancer :)
Community Support Moderator @ Experts Exchange

P.S.  REGARDING POINTS, Guidelines and more:  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp  
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6929876
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> YOU CANNOT DELETE A QUESTION with comments; special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process for further information, if needed.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE KnowledgePro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20087897.html
http://www.experts-exchange.com/questions/Q.20151838.html
http://www.experts-exchange.com/questions/Q.20139823.html
http://www.experts-exchange.com/questions/Q.20185160.html
http://www.experts-exchange.com/questions/Q.20187395.html


To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.20097192.html
http://www.experts-exchange.com/questions/Q.20103766.html

**** PLEASE DO NOT AWARD THE POINTS TO ME. *****
 
------------>  EXPERTS:  Please leave your closing recommendations if this item remains inactive another seven (7) days.  If you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643
POINTS FOR EXPERTS awaiting comments are listed here -> http://www.experts-exchange.com/commspt/Q.20277028.html
 

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange
0
 
LVL 5

Expert Comment

by:andriv
ID: 6930267
In the attempt to help clean up abandoned Questions, I will ask Community Support to close this Question. Unless there is objection or further activity, I will suggest to accept "ykf2000" comment(s) as an answer as soon as possible.

If you think your question was not answered at all, you can post a request in Community support (please
include this link) to refund your points.
The link to the Community Support area is: http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

Please do not accept this comment as an answer!

Andriv
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6966401
Thank you, Andy.

Finalized today by Moondancer - EE Moderator
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now