• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Google search

 
Greenhorn
Posts: 25
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying google search funtionality .How to change text box into Listbox dynamically or how to load all the values of listbox in textbox. I am getting search results in combo box now i want load the search results into textbox. is ther anyway to use text box as listbox.
My jsp code
<%--
Document : index
Created on : Aug 6, 2012, 5:51:25 PM
Author : Administrator
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Cache-Control" content="no-cache"> <meta http-equiv="Expires" content="Sat, 01 Dec 2001 00:00:00 GMT">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<link rel="stylesheet" type="text/css" href="/prowebapp/web/css/bondstyle.css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Address Search</title>
<script language="javascript" src="Scripts/Ajaxcalling.js"></script>

<script language="javascript">
function passvalue(){

document.getElementById('name').value=document.getElementById('DROPDOWN').value;

}
</script>


</head>
<body onload="document.DPIDS.name.focus()">

<div id="StateCombo" style="border-right: #000000 thin solid; border-top: #000000 thin solid;
font-weight: normal; border-left: #000000 thin solid; width:540px; border-bottom: #000000 thin solid;
height: 10px; background-color: gainsboro">

<form name="DPIDS">
<table class=textgreyboldTable>
<%
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", 0); //prevents caching at the proxy server
response.setHeader("Cache-Control", "max-stale=0"); // HTTP 1.1
%>

<tr>
<td>
<label>Address              :</label>


<input type="textarea" id="name" name="name" class=textInputDetails style="width: 300px" size="10" onkeyup="onKey();"/>

<input type="button" id="GetAdd" class="button3" value=" Go " onclick="getAddress();"/>
</td>
</tr>
<tr>
<td>
<label>Matching Address:</label>
<select name="DROPDOWN" id="DROPDOWN" style="width: 300px" size="10" onchange="passvalue();">
</select>
</td>
</tr>
<tr>
<td align="center">
<input type="button" id="SetValue" name="SetValue" class="button3" value=" Ok " onclick="GetMoniker();"/>
<input type="button" id="cancel" name="cancel" value="Cancel" onclick="window.parent.close();">
</td>
</tr>
<input type="hidden" id="dpid" name="dpid" class='textInputBox'>
<input type="hidden" name="Street" id="Street"/>
<input type="hidden" name="len" id="len"/>
<
<input type="hidden" name="Suburb" id="Suburb"/>
<input type="text" name="Postcode" id="Postcode" style="visibility: hidden"/>
<input type="hidden" name="Barcode" id="Barcode"/>
<input type="hidden" name="Statecode" id="Statecode"/>



</table>

</form>
</div>
</body>
</html>

Thanks in advance
 
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Use codetags for your code.
 
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Functionality you want to implement is called as Autocomplete functionality.

If you google with this term you will get plenty of result for how to implement it.
 
reply
    Bookmark Topic Watch Topic
  • New Topic