Is it possible to return values from Webview in bb 10??
Example: If I load a Webview for online banking in my app and is there a way to get some data (like reference number of the payment) returning from the Webview to the app
Asked
Active
Viewed 387 times
2

MouzmiSadiq
- 2,069
- 3
- 18
- 21
-
are you loading yout html file in webview? – Niranj Patel Apr 17 '13 at 09:10
2 Answers
1
At first you have to add a javascript in the html file that return document.documentElement.innerHTML; After completely loading the webview call evaluateJavaScript (const QString &script, bb::cascades::JavaScriptWorld::Typeworld world) function, this will evaluate the javascript in the webview. Lastly you should catch the sigal "javaScriptResult" from this signal you can get all the source of html file as qvariant.

pranavjayadev
- 937
- 7
- 31
0
For security sake, you cannot access the html content of the webview, except if you have set it yourself as a string.
You can access a redirection url, but without the Post parameter.

Benoit
- 1,922
- 16
- 25