@Hamidaraghi wrote:
How can I get multiple values from
Cordova InAppBrowser
usingexecutescript()
method in ionic3? I can get single value fromInAppBrowser
using:var browserRef = this.inAppbrowser.create("my_url", "_blank"); browserRef.on('loadstop').subscribe(() => { var codePass = "document.getElementById('RefNum').value"; browserRef.executeScript({ code: codePass }).then((values) => { alert(JSON.stringify(values[0]))}) // Array of values! })
My HTML document that I want to extract values from is shown below:
<html > <head id="Head1" > <title>Sep CallBack Page</title> </head> <body> <input id="RefNum" value=<?php echo $_POST['RefNum']; ?> /> <input id="State" value=<?php echo $_POST['State']; ?> /> </body> </html>
How can I retrieve both of
RefNum
andState
values from my HTML document URL using single injection?
Posts: 1
Participants: 1