11-07-2012 05:49 AM
Hi all,
I want to catch when a link is clicked in my webview and then ignore it.
So i found this in the doc :
https://developer.blackberry.com/cascades/referenc
But I get the error : ignore is not a function, also with accept, do I forget something ?
Thanks.
Solved! Go to Solution.
11-07-2012 12:25 PM
11-07-2012 12:26 PM
No I copy paste the doc
onNavigationRequested: { console.log("NavigationRequested: " + request.url + " navigationType=" + request.navigationType) if (!shouldAcceptNavigationToUrl(request.url)) { request.ignore(); }}
11-07-2012 12:34 PM
onNavigationRequested: {
console.log("NavigationRequested: " + request.url + " navigationType=" + request.navigationType)
if (shouldAcceptNavigationToUrl(request.url)) {
request.action = WebNavigationRequestAction.Accept
} else {
request.action = WebNavigationRequestAction.Ignore
}
}
This is what it should be according to the docs
11-07-2012 01:00 PM
Thanks ! It seems to work for : request.action = WebNavigationRequestAction.Ignore
But when I click I get the error that it doesn't know shouldAcceptNavigationToUrl.
Thanks.
11-07-2012 01:14 PM
11-07-2012 01:31 PM
Ok thanks for all !