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

155 lines
5.1 KiB
Plaintext
Raw Normal View History

2024-04-02 14:02:31 +00:00
<%@ 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 = "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/cl/";
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 = "description";
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="searcher">Find by command descriptive name, command name, or part of either
for individual CL commands.</LABEL></TD>
</TR>
<TR>
<TD width="15%"><BR><BR></TD>
<TD><FONT SIZE=-1>Example: Enter <EM>convert date</EM>, <EM>CVTDAT</EM>, or just <EM>DAT</EM>.</FONT><br>
<%
//START NON-TRANSLATABLE
temp_string = (String)request.getParameter("query");
String outString = "";
if (temp_string != null) {
outString = "<input type=text name=\"query\" value=\""+temp_string+"\" id=\"searchwords\" >";
out.print(outString);
} else {
outString = "<input type=text name=\"query\" id=\"searchwords\" >";
out.print(outString);
}
String lang = (String)request.getParameter("lang");
outString = "<input type=hidden name=\"lang\" value=\""+lang+"\">";
out.print(outString);
//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="description">
<input type=hidden name="field" value="_all">
<br><br><font size="-1">Show results containing:&nbsp;&nbsp;&nbsp;
<%
String outString1 = "<input type =\"radio\" name=\"search_type\" value=\"and\" id=\"allwords1\"><label for=\"allwords1\">All words</label>";
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>";
outString += "<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(outString1);
} else {
out.print(outString2);
}
//END NON-TRANSLATABLE
%>
&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="button" NAME="Go" VALUE="Go" onclick="submitSearch()"></font>
</TD>
</TR>
</table>
</FORM>