Calling a function on the server #2249
Unanswered
bradwall17
asked this question in
Q&A
Replies: 1 comment
-
Never mind on this. This whole time, I was actually calling the method and it was working. I just didn't see that it was crashing in a different part. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have a server that provides a web page that I am trying to view with react-native-webview.
The way it works is we connect to the page and use that page/port as the source. After it is loaded, I need to call a function on that web page. The function is called reloadPage(). This reloadPage function then will make calls back to the webview to request the token and other things.
Anyway, the problem that I have is that I can't find a way to call that function from my webview.
In Native Android, I was able to do this:
webView.loadUrl("javascript:reloadPage()");
Where webView is from the android.webkit.webView package.
It worked fine. I was able to run that after the page was loaded. That triggered off events I needed.
However, I can't for the life of me see how I can call this function from a webview in React Native. Is there anyway I can call this reloadPage that is part of the page that comes back to my webview in React Native? Any suggestions would be very appreciated. I have been trying this for the past 2 days and just can't see a way.
Beta Was this translation helpful? Give feedback.
All reactions