This code creates a search box, identical to MediaWiki's "search" box that searches the specific MediaWiki project, which may be placed on personal webpages and be used to allow visitors to that webpage to search Wikimedia projects and wikis based on MediaWiki software. In this example, the box searches on Meta.

Code edit

Opens results in the same window:

<form action="http://meta.wikimedia.org/wiki/Special:Search">
<p><input type="text" value="" id="SearchInput" name="search"/><br>
<input type="submit" value="Go" name="Go" id="searchGoButton"/>
<input type="submit" value="Search" name="fulltext"/></p>
</form>

Opens results in a new window:

<form action="http://meta.wikimedia.org/wiki/Special:Search" target="_blank">
<p><input type="text" value="" id="SearchInput" name="search"/><br>
<input type="submit" value="Go" name="Go" id="searchGoButton"/>
<input type="submit" value="Search" name="fulltext"/></p>
</form>

Example edit

It looks like this:

 

Customisation edit

  • If you want the search box to work for other Wikipedia or MediaWiki powered projects, replace the URL part of <form action="http://meta.wikimedia.org/"> with the URL of the project. Examples: