ibm-information-center/dist/eclipse/plugins/i5OS.ic.apifinder_5.4.0.1/table/searchform.jsp

155 lines
5.1 KiB
Plaintext

<%@ page language="java" contentType="text/html; charset=utf-8" %>
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<script language="javascript" type="text/javascript">
var alert_string = "Please enter a value in the search field.";
//START NON-TRANSLATABLE
//alert(window.location);
function openLink(url)
{
var url_low = url.toLowerCase();
var topic_string = "/help/topic/apis/";
if (url_low.indexOf("http://") == 0 ||
url_low.indexOf("https://") == 0 ||
url_low.indexOf("file://") == 0 ||
url_low.indexOf("ftp://") == 0 )
{
window.open(url, 'pdf_window');
}
else if ( url_low.lastIndexOf('.pdf') == url.length-4)
{
window.open(topic_string+url, 'pdf_window');
}
else
{
location = topic_string+url;
}
}
<%
String temp_string = (String)request.getParameter("sort_type");
if (temp_string != null)
out.println("var original_sort_type = \""+temp_string+"\";");
else
out.println("var original_sort_type = \"ascending\";");
temp_string = (String)request.getParameter("sort_column");
if (temp_string != null)
out.println("var original_sort_column = \""+temp_string+"\";");
else
out.println("var original_sort_column = \"apidescriptivename\";");
temp_string = (String)request.getAttribute("query");
if (temp_string != null)
out.println("var original_query = \""+temp_string+"\";");
else
out.println("var original_query = \"\";");
temp_string = (String)request.getParameter("field");
if (temp_string != null)
out.println("var original_field = \""+temp_string+"\";");
else
out.println("var original_field = \"_all\";");
%>
function submitSearch()
{
var query = document.form_1.query.value;
if (document.form_1.query.value == null || document.form_1.query.value == "")
alert(alert_string);
else
document.form_1.submit();
}
function submitReset()
{
document.form_1.query.value = "";
document.form_1.sort_type.value = "ascending";
document.form_1.sort_column.value = "apidescriptivename";
document.form_1.submit();
}
function submitSort(sort_column)
{
if (sort_column == original_sort_column)
{
if (original_sort_type == "ascending")
document.form_1.sort_type.value = "descending";
else
document.form_1.sort_type.value = "ascending";
}
else
document.form_1.sort_type.value = "ascending";
document.form_1.sort_column.value = sort_column;
document.form_1.query.value = original_query;
document.form_1.field.value = original_field;
document.form_1.submit();
}
//END NON-TRANSLATABLE
////////// -->
</script>
<form name="form_1" method="GET" action="InteractiveTableManager">
<table cellspacing="4" cellpadding="4" border="0" width="85%" align="CENTER">
<tr>
<td colspan="2" class="finderbar"><font size="+1"><strong>Find by name</strong></font></td>
</tr>
<tr>
<td colspan="2"><label for="searchwords">Find by API descriptive name, by API name, or by part of the name.</label></td>
</tr>
<tr>
<td width="15%"><br><br></td>
<td><font size="-1">Example: Enter <em>QEZCHBKS</em>, <em>Change backup schedule</em>, or just <em>QEZ</em>.</font><br>
<%
//START NON-TRANSLATABLE
temp_string = (String)request.getParameter("query");
if (temp_string != null) {
out.print("<input type=text name=\"query\" value=\""+temp_string+"\" id=\"searchwords\" >");
} else {
out.print("<input type=text name=\"query\" id=\"searchwords\" >");
}
String lang = (String)request.getParameter("lang");
out.print("<input type=hidden name=\"lang\" value=\""+lang+"\">");
//END NON-TRANSLATABLE
%>
<input type=hidden name="table_name" value="table">
<input type=hidden name="function" value="search">
<input type=hidden name="query_filter" value="">
<input type=hidden name="sort_type" value="ascending">
<input type=hidden name="sort_column" value="apidescriptivename">
<input type=hidden name="field" value="_all">
<br><br><font size="-1">Show results containing:&nbsp;&nbsp;&nbsp;
<%
String outString0 = "<input type =\"radio\" name=\"search_type\" value=\"and\" id=\"allwords1\"><label for=\"allwords1\">All words</label>";
String outString1 = "<input type=\"radio\" name=\"search_type\" value=\"or\" checked id=\"anywords1\"><label for=\"anywords1\">Any words</label>";
String outString2 = "<input type =\"radio\" name=\"search_type\" value=\"and\" checked id=\"allwords1\"><label for=\"allwords1\">All words</label>";
String outString3 = "<input type=\"radio\" name=\"search_type\" value=\"or\" id=\"anywords1\"><label for=\"anywords1\">Any words</label>";
//START NON-TRANSLATABLE
temp_string = (String)request.getParameter("search_type");
if (temp_string != null && temp_string.equals("or"))
{
out.print(outString0);
out.print(outString1);
}
else
{
out.print(outString2);
out.print(outString3);
}
//END NON-TRANSLATABLE
%>
&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="button" NAME="Go" VALUE="Go" onclick="submitSearch()"></font>
</td>
</tr>
</table>
</form>