I have followed a few Google tutorials and also followed Ionic documentation but still stuck on this. I would like to POST data to another URL in the SYSTEM Browser.
This is what I am currently working with
Making a fake form in JavaScript to submit to URL
var pageContent = '<html><head></head><body><form id="RegisterForm" action="https://www.example.com/api/register/" method="post">' + '<input type="hidden" name="firstname" value="John">' + '<input type="hidden" name="lastname" value="Doe">' '</form> <script type="text/javascript">document.getElementById("RegisterForm").submit();</script></body></html>'; var pageContentUrl = 'data:text/html;base64,' + btoa(pageContent);
I have tried submitting it with this code and it doesn’t work
new InAppBrowser(pageContentUrl, '_system', 'location=yes');
Also tried this it doesn’t work
window.open(pageContentUrl, "_system", 'location=yes');
This opens the system browser but I am not able to pass the Form data
window.open( "https://www.example/api/register/", "_system", "EnableViewPortScale=yes" );
Please help!