Difference between revisions of "Template:Find"

From Organic Design wiki
m
Line 11: Line 11:
 
|src    = /www/images/1/1b/Go-icon.png
 
|src    = /www/images/1/1b/Go-icon.png
 
|alt    = Title or DPL-query
 
|alt    = Title or DPL-query
|onClick = if (findForm.findInput.indexOf('=')<0) findForm.title = findForm.findInput;
+
|onClick = if (0>findForm.findInput.value.indexOf('=')) findForm.action = '/wiki/index.php?title='+findForm.findInput.value;
            else findForm.content = '{'+'{#dpl:'+findForm.findInput+'}'+'}';
+
          else findForm.action = '/wiki/index.php?content={'+'{%23dpl:'+findForm.findInput.value+'}'+'}';
 
}}
 
}}
 
{{#input:
 
{{#input:
Line 18: Line 18:
 
|src    = /www/images/1/14/Search-icon.png
 
|src    = /www/images/1/14/Search-icon.png
 
|alt    = Full text search
 
|alt    = Full text search
|onClick = findForm.action='/wiki/index.php'; findForm.fulltext = findForm.findInput; findForm.title = 'Special:Search';
+
|onClick = findForm.action='/Special:Search?fulltext='+findForm.findInput.value;
 
}}
 
}}
 
{{#input:
 
{{#input:
Line 30: Line 30:
 
|src    = /www/images/3/3a/Favicon_google.png
 
|src    = /www/images/3/3a/Favicon_google.png
 
|alt    = Google
 
|alt    = Google
|onClick = findForm.action='http'+'://www.google.com/search'; findForm.q = findForm.findInput.value;
+
|onClick = findForm.action='http'+'://www.google.com/search?q='+findForm.findInput.value;
 
}}
 
}}
 
}}
 
}}

Revision as of 04:58, 11 June 2007

{{#form:name=findForm|class=find| {{#input:name=title|type=hidden}} {{#input: name = findInput |type = text |value = Title or DPL-query |onClick = findForm.findInput.value = ; }} {{#input: type = image |src = /www/images/1/1b/Go-icon.png |alt = Title or DPL-query |onClick = if (0>findForm.findInput.value.indexOf('=')) findForm.action = '/wiki/index.php?title='+findForm.findInput.value; else findForm.action = '/wiki/index.php?content={'+'{%23dpl:'+findForm.findInput.value+'}'+'}'; }} {{#input: type = image |src = /www/images/1/14/Search-icon.png |alt = Full text search |onClick = findForm.action='/Special:Search?fulltext='+findForm.findInput.value; }} {{#input: type = image |src = /www/images/4/4f/Favicon_pedia.png |alt = Wikipedia |onClick = findForm.action='http'+'://en.wikipedia.org/wiki/'+findForm.findInput.value; }} {{#input: type = image |src = /www/images/3/3a/Favicon_google.png |alt = Google |onClick = findForm.action='http'+'://www.google.com/search?q='+findForm.findInput.value; }} }}