0
I created a search box with two Buttons, one for Google Search and one for Wikipedia Search. The Google button works very well but I can’t do the same for Wikipedia. Follow the code...
<!DOCTYPE html>
<html>
<head>
<title>Search Box Example 1</title>
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
<!-- CSS styles for standard search box -->
<style type="text/css">
#tfheader{
background-color:#c3dfef;
}
#tfnewsearch{
float:left;
padding:20px;
}
.tftextinput{
margin: 0;
padding: 5px 65px;
font-family: Arial, Helvetica, sans-serif;
font-size:14px;
border:1px solid #0076a3;
border-top-left-radius: 5px 5px;
border-bottom-left-radius: 5px 5px;
border-top-right-radius: 5px 5px;
border-bottom-right-radius: 5px 5px;
}
.tfbutton {
margin: 0;
padding: 5px 15px;
font-family: Arial, Helvetica, sans-serif;
font-size:14px;
outline: none;
cursor: pointer;
text-align: center;
text-decoration: none;
color: #ffffff;
border: solid 1px #0076a3; border-right:0px;
background: #0095cd;
background: -webkit-gradient(linear, left top, left bottom, from(#00adee), to(#0078a5));
background: -moz-linear-gradient(top, #00adee, #0078a5);
border-top-left-radius: 5px 5px;
border-bottom-left-radius: 5px 5px;
border-top-right-radius: 5px 5px;
border-bottom-right-radius: 5px 5px;
}
.tfbutton:hover {
text-decoration: none;
background: #007ead;
background: -webkit-gradient(linear, left top, left bottom, from(#0095cc), to(#00678e));
background: -moz-linear-gradient(top, #0095cc, #00678e);
}
/* Fixes submit button height problem in Firefox */
.tfbutton::-moz-focus-inner {
border: 0;
}
.tfclear{
clear:both;
}
</style>
</head>
<body>
<!-- HTML for SEARCH BAR -->
<div id="tfheader">
<form id="tfnewsearch" method="get" action="https://www.google.com/search" target="_blank" >
<input type="text" class="tftextinput" name="q" id="google-search" size="21" maxlength="120"><br><br>
<input type="submit" value="Pesquisa Gooogle" class="tfbutton">
<button type="submit" class="tfbutton" name="q" id="wikipedia-search" formaction="http://pt.wikipedia.org/wiki/Special:Pesquisar/">Pesquisa Wikipedia</button>
</form>
<div class="tfclear"></div>
</div>
</body>
</html>
The name of input research should be
search
, instead ofq
, to work with the Wikipedia– Valdeir Psr