How to submit an html form using webview


#1

I am trying to submit a form using webview but nothing is happening. Here is my code:
const webViewModule = require(“tns-core-modules/ui/web-view”);
var webView = new webViewModule.WebView();
//now it try this
webView.on(webViewModule.WebView.loadFinishedEvent, function (args) {
console.log(‘loading from the webview trigger’);
console.dir(args);
let message;
if (!args.error) {
message = "WebView finished loading " + args.url;
}
else {
message = "Error loading " + args.url + ": " + args.error;
}
console.log(message);
});
webView.src = “~/AcsForm/index.html”;

What am I doing wrong?


#2

I used this to fix that problem: https://github.com/shripalsoni04/nativescript-webview-interface-demo