I would suggest look at phonegap Apis.From PhoneGap.com I am not sure this working now days. Install a JavaScript code editor.like Visual code for syntax error. Check and debug by chrome inspect . Check event handler Apis from phonegap api and check argument you passing and api written.
Post this kind of question on other forum.We can help but in other forum. On Fri, Apr 20, 2018, 00:09 ranjan sasmal <sasmalranja...@gmail.com> wrote: > Hi Sir, > > please help me my issues . I can't understand why searchbutton is not > working on cordova app during search key pressed in android. > > Below my code.............. > > <html> > <head> > <title>Search Button Example</title> > > <script type="text/javascript" charset="utf-8" > src="cordova.js"></script> > <script type="text/javascript" charset="utf-8"> > > // Wait for device API libraries to load > // > function onLoad() { > document.addEventListener("deviceready", onDeviceReady, false); > } > > // device APIs are available > // > function onDeviceReady() { > // Register the event listener > document.addEventListener("searchbutton", onSearchKeyDown, false); > } > > // Handle the search button > // > function onSearchKeyDown() { > console.log('ok'); > } > > </script> > </head> > <body onload="onLoad()"> > <input type="search" /> > </body> > </html> > > It should console ok msg . but it is not working why? > > Thanks > Ranjan Sasmal. >