Updates are still taking place. Sorry for delays!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
audio avg avg 8 blue screen brand new codec control panel conversion crash delete personal data desktop display dos driver duplicate dvd error error message excel explorer file firefox game graphics hardware hijackthis log install installation internet itunes javascript laptop macro malware monitor msconfig msn music network outlook outlook 2003 outlook express php problem program random rundll32 security seo sound sp3 spyware switch tag cloud trojan usb video virtumonde virus vista visual basic vundo wallpaper windows windows vista windows xp wireless word xp sp3 youtube
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Adding a seach engine from another website to my site?


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
ChimpanzeeUK's Avatar
Computer Specs
Member with 68 posts.
 
Join Date: Jul 2007
Location: Bristol, UK
Experience: Advanced
09-May-2008, 07:16 AM #1
Adding a seach engine from another website to my site?
I have a website where I would like to allow my users to run a search on a second site. The search engine I want to use is here: http://www.edubase.gov.uk/EstablishmentFind.aspx

Basically, I want to have a single text input box and a submit button on my site which, when the user clicks on it, the query is submitted to the 'Name of Establishment' field on the other site and the results page (from the other site) is shown.

I have a feeling that this should be possible as the google toolbar allows you to do it (add a custom search to the generic 'search' field)

Any suggestions. Sorry I haven't explained this very well.
__________________
Windows Vista Business SP1
Intel Core 2 Quad @ 2.4GHz
XFX nForce 680i LT SLI Motherboard
XFX Nvidia GeForce 8800 GTX: Alpha Dog XXX Edition
4GB DDR2 RAM (Vista only seeing 2.8!)
Dual 1440x900 Monitors
1 500gb drive for OS/programs, 1 500gb RAID 1 for data +several external HDDs
10meg VM broadband connection
Netgear Rangemax WPN 824v2 Router

:: Windows Experience Index :: 5.3 ::
  • Processor: 5.9
  • Memory (RAM): 5.3
  • Graphics: 5.9
  • Gaming graphics: 5.9
  • Primary hard disk: 5.8
Big-K's Avatar
Distinguished Member with 6,867 posts.
 
Join Date: Nov 2003
Location: Kansas
Experience: Advanced
09-May-2008, 09:02 AM #2
Your best bet is to set up a form on your own site, give the fields the same 'name' attributes as their corresponding ones on the actual site(view source), then have the form point(action="") to http://www.edubase.gov.uk/EstablishmentFind.aspx, which is where the search engine points to. Hopefully, but not neccesarily, the post data from your form will mesh with theirs. This isn't always the case though, so try first to make sure.
ChimpanzeeUK's Avatar
Computer Specs
Member with 68 posts.
 
Join Date: Jul 2007
Location: Bristol, UK
Experience: Advanced
09-May-2008, 11:28 AM #3
lol. That was my first thought but then I thought there's no way it would be that easy. I'll give it a go, Fingers crossed.

Thanks!
Big-K's Avatar
Distinguished Member with 6,867 posts.
 
Join Date: Nov 2003
Location: Kansas
Experience: Advanced
10-May-2008, 12:36 PM #4
Often times it is that easy, although it could be considered a security risk. It's the trick alot of API's are based off of, like paypal and myspace(i havn't actually tried an api for myspace, but the one i'm working on myself uses it).
ChimpanzeeUK's Avatar
Computer Specs
Member with 68 posts.
 
Join Date: Jul 2007
Location: Bristol, UK
Experience: Advanced
12-May-2008, 07:42 AM #5
Unfortunately, it seems it wasn't that easy

This is what I added to my page:
Code:
<p><strong>Search for a School</strong></p>
<form name="frmFindForm" method="post" action="http://www.edubase.gov.uk/EstablishmentFind.aspx" id="frmFindForm">
<input type="hidden" name="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" value="" />
<input type="hidden" name="Action" value="FIND" />
<input type="hidden" name="lstLEAName" id="lstLEAName" value="0">
<input type="hidden" name="lstOpenClosed" id="lstOpenClosed" value="0">
<input type="hidden" name="lstPhaseOfEducation" id="lstPhaseOfEducation" value="0">
<input type="hidden" name="lstGender" id="lstGender" value="0">
<input type="hidden" name="lstEstablishmentType" id="lstEstablishmentType" value="0">
<input type="hidden" name="lstSearchType" id="lstSearchType" value="1">
<input type="hidden" name="lstLocationDistance" id="lstLocationDistance" value="1">
<input type="hidden" name="txtURN" type="text" maxlength="6" id="txtURN" />
<input type="hidden" name="txtLEA" type="text" maxlength="6" id="txtLEA" />
<input id="btnWelshLAs" type="hidden" name="btnWelshLAs" />
<input name="txtDfESNumber" type="hidden" maxlength="6" id="txtDfESNumber" />
<input name="txtEstablishmentLocation" type="hidden" id="txtEstablishmentLocation" />
<input name="txtPostcode" type="hidden" id="txtPostcode" />
<input id="chkLocationSearch" type="hidden" name="chkLocationSearch" />
<input name="txtLocationPostcode" type="hidden" id="txtLocationPostcode" />

<input name="txtEstablishmentName" type="text" id="txtEstablishmentName" />
<input type="submit" name="cmdFindTop" value="Search" id="cmdFindTop" class="submit" />
</form>
I have a hidden field for all the items that aren't being used and I believe I have entered a default value for the ones that require them.

Can anyone think of anything else I could try. The page again is http://www.edubase.gov.uk/EstablishmentFind.aspx - it appears to be the one that processes the search as well as holding the search fields.
__________________
Windows Vista Business SP1
Intel Core 2 Quad @ 2.4GHz
XFX nForce 680i LT SLI Motherboard
XFX Nvidia GeForce 8800 GTX: Alpha Dog XXX Edition
4GB DDR2 RAM (Vista only seeing 2.8!)
Dual 1440x900 Monitors
1 500gb drive for OS/programs, 1 500gb RAID 1 for data +several external HDDs
10meg VM broadband connection
Netgear Rangemax WPN 824v2 Router

:: Windows Experience Index :: 5.3 ::
  • Processor: 5.9
  • Memory (RAM): 5.3
  • Graphics: 5.9
  • Gaming graphics: 5.9
  • Primary hard disk: 5.8
Big-K's Avatar
Distinguished Member with 6,867 posts.
 
Join Date: Nov 2003
Location: Kansas
Experience: Advanced
12-May-2008, 09:26 PM #6
well, the first thing i notice is you dont have a value for __VIEWSTATE, but the site does.

what happens when you submit? Does it give the 'A search must contain criteria in at least one of the textboxes. Please try again.' message?
ChimpanzeeUK's Avatar
Computer Specs
Member with 68 posts.
 
Join Date: Jul 2007
Location: Bristol, UK
Experience: Advanced
13-May-2008, 03:05 AM #7
I got it working in the end. I think I must have missed something out - maybe it was the VIEWSTATE thing. I tried just copying the whole form and putting what I don't need in a display:none DIV and it works now.

Thanks very much for your help!!

(Hmm. Can't find the 'Solved' function under the new forum design?)
__________________
Windows Vista Business SP1
Intel Core 2 Quad @ 2.4GHz
XFX nForce 680i LT SLI Motherboard
XFX Nvidia GeForce 8800 GTX: Alpha Dog XXX Edition
4GB DDR2 RAM (Vista only seeing 2.8!)
Dual 1440x900 Monitors
1 500gb drive for OS/programs, 1 500gb RAID 1 for data +several external HDDs
10meg VM broadband connection
Netgear Rangemax WPN 824v2 Router

:: Windows Experience Index :: 5.3 ::
  • Processor: 5.9
  • Memory (RAM): 5.3
  • Graphics: 5.9
  • Gaming graphics: 5.9
  • Primary hard disk: 5.8
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:41 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.