1. Dodamies uz lapu, kurā vēlamies, lai Jūsu saitā uzrādītos meklētājs
2. Atveram HTML saturu, kurā ievietojam skriptu:
Code
<script type="text/javascript">
//Search start
function searchSelect(f) {
n = f.modul.selectedIndex;
modul = f.modul.options[n].value;
document.search.action = 'http://ucozwebmeistars.ucoz.lv/'+modul+'/';
if (modul == 'news')
{
document.search.a.value = '14';
}
else
if (modul == 'load' || modul == 'publ' || modul == 'dir' || modul == 'board')
{
document.search.a.value = '2';
}
else
if (modul == 'blog')
{
document.search.a.value = '13';
}
else
if (modul == 'faq')
{
document.search.a.value = '3';
}
}
//Search end
</script>
<div class="searchForm">
<form name="search" onSubmit="this.sfSbm.disabled=true" method="post" style="margin: 0px;">
<div class="schQuery" align="center">
<input name="query" maxlength="30" size="20" class="queryField" type="text">
<select name="modul" onChange="searchSelect(this.form);">
<option value="none">Kur meklēt?</option>
<option value="news">Jaunumi</option>
<option value="load">Faili</option>
<option value="publ">Raksti</option>
<option value="dir">Saiti</option>
<option value="blog">Blogi</option>
<option value="faq">FAQ</option>
</select>
</div>
<div class="schBtn" align="center">
<input class="searchSbmFl" onClick="this.sfSbm.disabled=true" name="sfSbm" value="« Meklēt »" type="submit">
</div>
<input name="a" type="hidden">
</form>
</div>
3. Iznākums: