Difference between revisions of "Template:Find"
m |
m (test with normal buttons) |
||
Line 4: | Line 4: | ||
{{#input:id=input|type=text|value=Title or DPL-query}} | {{#input:id=input|type=text|value=Title or DPL-query}} | ||
{{#input: | {{#input: | ||
− | type = | + | type = submit |
− | | | + | |value = Title or DPL-query |
− | |||
|onClick = var input = document.getElementById('input').value; | |onClick = var input = document.getElementById('input').value; | ||
findForm.action = '/wiki/index.php'; | findForm.action = '/wiki/index.php'; | ||
Line 13: | Line 12: | ||
}} | }} | ||
{{#input: | {{#input: | ||
− | type = | + | type = submit |
− | | | + | |value = Full text search |
− | |||
|onClick = findForm.action='/Special:Search?fulltext='+document.getElementById('input').value; | |onClick = findForm.action='/Special:Search?fulltext='+document.getElementById('input').value; | ||
}} | }} | ||
{{#input: | {{#input: | ||
− | type = | + | type = submit |
− | | | + | |value = Wikipedia |
− | |||
|onClick = findForm.action='http'+'://en.wikipedia.org/wiki/'+document.getElementById('input').value; | |onClick = findForm.action='http'+'://en.wikipedia.org/wiki/'+document.getElementById('input').value; | ||
}} | }} | ||
{{#input: | {{#input: | ||
− | type = | + | type = submit |
− | | | + | |value = Google |
− | |||
|onClick = findForm.action='http'+'://www.google.com/search'; | |onClick = findForm.action='http'+'://www.google.com/search'; | ||
document.getElementById('q').setAttribute('value',document.getElementById('input').value); | document.getElementById('q').setAttribute('value',document.getElementById('input').value); | ||
}} | }} | ||
}} | }} |
Revision as of 06:19, 11 June 2007
{{#form:name=findForm|class=find|action=/wiki/index.php| {{#input:name=content|id=query|type=hidden}} {{#input:name=q|id=q|type=hidden}} {{#input:id=input|type=text|value=Title or DPL-query}} {{#input: type = submit |value = Title or DPL-query |onClick = var input = document.getElementById('input').value; findForm.action = '/wiki/index.php'; if (0>input.indexOf('=')) findForm.action = '/'+input; else document.getElementById('query').setAttribute('value','{'+'{#dpl:'+input+'}'+'}'); }} {{#input: type = submit |value = Full text search |onClick = findForm.action='/Special:Search?fulltext='+document.getElementById('input').value; }} {{#input: type = submit |value = Wikipedia |onClick = findForm.action='http'+'://en.wikipedia.org/wiki/'+document.getElementById('input').value; }} {{#input: type = submit |value = Google |onClick = findForm.action='http'+'://www.google.com/search'; document.getElementById('q').setAttribute('value',document.getElementById('input').value); }} }}