SearchBox.onresultsuggestionchosen event

Applies to Windows only

Raised when the user selects a suggested option for the search.

Syntax


<div 
    data-win-control="WinJS.UI.SearchBox" 
    data-win-options="{onresultsuggestionchosen : handler}">
</div>


function handler(eventInfo) { /* Your code */ }
 
// addEventListener syntax
searchBox.addEventListener("resultsuggestionchosen", handler);
searchBox.removeEventListener("resultsuggestionchosen", handler);


Event information

SynchronousNo
BubblesYes
CancelableYes

 

Event handler parameters

eventInfo

Type: CustomEvent

An object that contains information about the event. The detail property of this object contains the following sub-properties:

detail.tag
detail.keyModifiers

The virtual key used when submitting the query text. This property is set to a flags enum that has one or more of these possible values:

Virtual key modifierDescription

none

Value: 0

No virtual key modifier.

control

Value: 1

The Ctrl (control) virtual key.

menu

Value: 2

The Menu virtual key.

shift

Value: 4

The Shift virtual key.

windows

Value: 8

The Windows virtual key.

 

detail.storageFile

Requirements

Minimum supported client

Windows 8.1 [Windows Store apps only]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps only]

Minimum supported phone

None supported

Namespace

WinJS.UI

Library

Ui.js

See also

SearchBox

 

 

Show:
© 2014 Microsoft