InfoSpace - Predictive Text
SDK Home | Client Side Results SDK - Home
Page last modified: 24 Apr 2017

Predictive Text

Predictive Text provides real time suggestions to users for search terms, based on the first letters they type into the search field.

Predictive Text is a separate paid service. Please contact your Business Development Manager or Partnership Manager for details.

Implementation

  1. Add the script tags (below) to the bottom of the page, just above the closing body tag </body>.
  2. Add ID attributes in the var_ispace_txtElements= section of the script, for any text boxes that are to utilize predictive text.
  3. Use style sheet elements to customize the suggestion panel. CSS style sheet elements can be used to customize the Predictive Text menu.

Sample Script Tag

<script language="javascript"type="text/javascript">
 var ispace_txtElements = ['firstTextId', 'secondTextId', 'thirdTextId'];
 var ispace_brand = '&lt;cobrand&gt;';
</script>
<script src="http://imagecdn.infospace.com/search/lib/ptwidget-1.0.js"></script>

Sample CSS

<style>
 .suggest_link {
   background-color: #ffffff;
   padding: 2px 6px 2px 6px;
   height:14px;
   line-height: 14px;
   overflow:hidden;
 }
 .suggest_link_over {
   background-color: #d3d3d3;
   padding: 2px 6px 2px 6px;
   height:14px;line-height: 14px;
   overflow:hidden;
   cursor:pointer;
   color: #000000;
 }
 .suggestPanel {
   position: absolute; 
   display:none;
   background-color: #ffffff;
   text-align: left;
   border: 1px solid #000000;
   font-family: Arial, Verdana, Helvetica;font-size: 12px;
   z-index: 10;
 }
</style>