Just two days ago, I removed the search bar from the top of every page on this site. I wanted to have more than one search engine but I did not have a compact way to do it. Then I thought of an input box for the search words followed by three buttons for each of the search engines, as can be seen above.
- Form submitting data to new window and to two different pages
- on plus2net before June 27, 2014.
- Separate Form Submit Buttons That Go To Different URLs
- by Chris Coyier on CSS-TRICKS, August 2, 2017.
Here is what ensued from this reading: a fairly simple HTML form.
The first three lines correspond roughly to a typical form for search. In
fact, it's like the first one found here on the Archives page. The two other lines, defining the buttons
associated with the other engines, are substantially the same except for the
addition of the
onclick attribute that redefines the form
action. This is how the URL is modified to reach the targeted search engine.
Differences in the values of the
attributes correspond to the different requirements of engines:
https://duckduckgo.com/?q=arduino&sites=sigmdel.ca/michel https://www.google.ca/search?q=arduino&sitesearch=sigmdel.ca/michel https://www.bing.com/search?q=arduino&q1=site:sigmdel.ca/michel
It's simple, it's clever and I would not have arrived at this solution without the help of others. Once again, thank you to everyone who generously shares their knowledge.