How to create search engine with two parameters in Opera?
Friday, 15. February 2008, 09:13:22
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, you have to 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. You have to 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








