Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

How I can pass a value in localStorage to InAppBrowser using executescript event

$
0
0

@nad3o wrote:

Hello! I have a problem with the plugin InAppBrowser.

I would like to insert a value stored in localStorage from my ionic app in a form on my website (username and password). It works fine with a simple value like 'test', but when I want to insert a value like localStorage.getItem('onlineIdStore') nothing is happening. Do you have a solution?

I found a similar problem but the solution does not work: autologin-with-inappbrowser-on-an-external-website

Here is my code:

   var ref = window.open('website', '_blank', 'location=no');
   ref.addEventListener('loadstop', function(event) {
   ref.executeScript({ code: "document.getElementById('doc_login_username').value = 'test' " });
   });

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>