How to create search engine with two parameters in Opera?
Friday, February 15, 2008 9:13:22 AM
Sometimes we need to specify two parameters for search as in the following search.
http://images.google.com/images?imgtype=face&q=monkey
It is possible to create search engine for the above using JavaScript.
By creating a search engine with the following JavaScript in address field, you can search Google Images from address bar by typing <search engine keyword><space><search parameter 1><space><search parameter 2> (example: gi face monkey)
javascript:var s='%s';var p=s.indexOf('+');if(p>-1){var s1=s.split('+');var s2=s.slice(p+1)};window.location.href='http://images.google.com/images?imgtype='+s1[0]+'&q='+s2;
To create search engine for another site, modify images.google.com/images?imgtype='+s1[0]+'&q='+s2; part in the above JavaScript. When you perform search, s1[0] will be replaced by first parameter & s2 with second parameter.
If <search parameter 1> is more than one word use the following JavaScript. Use dot instead of space as separtor between search parameters.
javascript:var s='%s';var p=s.indexOf('.');if(p>-1){var s1=s.split('.');var s2=s.slice(p+1)};window.location.href='http://images.google.com/images?imgtype='+s1[0]+'&q='+s2;
Update: Apr 28, 2008







1 2 Next »
vd2k # Saturday, February 16, 2008 11:38:57 AM
I created my own custom search straight away: Google Maps Directions.
javascript:var s='%s';var p=s.indexOf('+');if(p>-1){var s1=s.split('+');var s2=s.slice(p+1)};window.location.href='http://maps.google.nl/maps?f=d&hl=en&geocode=&saddr='+s1[0]+'&daddr='+s2;Tamil # Saturday, February 16, 2008 6:06:16 PM
MassimoPetrax # Saturday, February 23, 2008 8:29:33 AM
I'm trying to create a search engine for Torrentz.com using your method but I can't figure out why my solution does not work.
A usual link of this search engine is:
http://torrentz.com/search?q=foo+bar
So I create this entry:
javascript:var s='%s';var p=s.indexOf('+');if(p>-1){var s1=s.split('+');var s2=s.slice(p+1)};window.location.href='http://torrentz.com/search?q=%27+s1[0]%27+%27+s2;
Looks like it doesn't accept the "+" between the two strings and I can't understand why. Any ideas?
Thanks in advance :-)
Tamil # Saturday, February 23, 2008 8:45:52 AM
Originally posted by Gesu`:
You didn't place + after s1[0]Simple & easy one
MassimoPetrax # Saturday, February 23, 2008 3:58:02 PM
I suppose that the site has changed its behaviour because in the past I used the "simple solution" and it didn't work. And I'm pretty sure it was that same exact string.
Anyway, thanks again!
ALBERT DOINAMAGDALENA1 # Thursday, April 17, 2008 3:58:29 PM
Nate FMR-NF # Thursday, May 15, 2008 4:52:40 PM
Apna DostPercy Shroff # Wednesday, July 2, 2008 1:21:09 PM
nizamx # Friday, July 4, 2008 4:28:37 PM
Tamil # Friday, July 4, 2008 4:38:13 PM
nizamx # Friday, July 4, 2008 5:13:19 PM
I put that search field to Opera's toolbar.
Tamil # Friday, July 4, 2008 5:19:56 PM
nizamx # Friday, July 4, 2008 5:49:21 PM
Tamil # Friday, July 4, 2008 5:55:05 PM
Originally posted by nizamx:
AFAIK, not possible with search field.@Percy Shroff, AFAIK it is not possible.
Apna DostPercy Shroff # Sunday, July 20, 2008 10:53:03 AM
URL=javascript:var s='%s';window.location.href='Page with %s Susbstitued by '+s+';open('Page with %s Susbstitued by '+s+'');open('Page with %s Susbstitued by '+s+'');
Unregistered user # Friday, October 10, 2008 12:09:53 AM
Tamil # Friday, October 10, 2008 11:29:45 AM
Unregistered user # Thursday, May 14, 2009 2:20:52 PM
Tamil # Friday, May 22, 2009 8:42:59 AM
Unregistered user # Saturday, October 24, 2009 6:43:45 PM
Tamil # Saturday, October 24, 2009 9:11:34 PM
xiborg # Tuesday, February 9, 2010 3:01:01 PM
Thank you
Unregistered user # Wednesday, March 17, 2010 2:43:57 PM
Tamil # Thursday, March 18, 2010 5:53:02 AM
Unregistered user # Thursday, March 18, 2010 9:20:32 AM
NoOoSi # Monday, May 3, 2010 1:57:02 PM
The url doesn't change here after performing a search and i couldnt find any hint within the source code either...
When creating a search engine "javascript:sendRequest();" is shown in the adress field - but this alone doesnt work of course...
Tamil # Monday, May 3, 2010 3:03:11 PM
NoOoSi # Tuesday, May 4, 2010 8:06:49 AM
what if i want to do a search for a single host ("share-online.biz" for example), what string do i have to add to the address?
Tamil # Thursday, May 6, 2010 2:55:46 PM
Originally posted by NoOoSi:
Using Proxomitron log window.Originally posted by NoOoSi:
I can't figure it out.efAston # Saturday, October 16, 2010 11:42:00 AM
When I tried that it opened the search results in the new tab, but in the active tab as well. Is there any way of doing it without affecting the active tab?
Tamil # Sunday, October 17, 2010 2:06:55 PM
efAston # Sunday, October 24, 2010 2:00:37 AM
Tamil # Sunday, October 24, 2010 2:10:30 AM
m3admwebm3web # Thursday, December 16, 2010 10:16:46 PM
Tamil # Thursday, December 16, 2010 11:27:34 PM
m3admwebm3web # Monday, December 27, 2010 8:53:20 PM
Tamil # Tuesday, December 28, 2010 12:21:29 AM
Unregistered user # Tuesday, December 28, 2010 8:12:32 AM
Tamil # Tuesday, December 28, 2010 8:26:11 AM
Unregistered user # Tuesday, December 28, 2010 10:10:35 AM
lifeh2o # Monday, January 3, 2011 8:20:23 AM
lifeh2o # Monday, January 3, 2011 8:27:03 AM
lifeh2o # Monday, January 3, 2011 8:28:17 AM
Tamil # Monday, January 3, 2011 2:47:00 PM
Originally posted by lifeh2o:
%t = currently selected text%c = clipboard content
%u = active document URL
%l = link address
%i = number of results and it is no longer supported
Unregistered user # Friday, April 15, 2011 4:23:07 PM
Tamil # Saturday, April 16, 2011 9:58:23 AM
Unregistered user # Saturday, April 16, 2011 4:22:52 PM
Tamil # Saturday, April 16, 2011 4:25:32 PM
I tried with indianrail.gov.in but didn't work.
phpmoli # Thursday, June 30, 2011 9:48:45 PM
Tamil # Friday, July 1, 2011 2:25:20 AM