Hi, I am needing to know how I can open a screen from an html button.
This is possible in my opinion. What did you have tried so far?
use the WebViewString property of the Webviewer component together with some JavaScript
How does the property Webviewer.WebViewString work?
Taifun
I tried an href=âgo: screenâ but it didnât work, and nothing else.
I think that is not what I am looking for, I need this:
CLICK ME!
and from there open the screen that calls from the href
Maybe a kind of that. Maybe you should add a stop loading.
I did not try it
Building on what @Taifun has sent you, this is one way to open the screen:
HTML
<a onclick="openScreen('SCREEN_NAME')">Click me</a>
JS
let openScreen = (screenName) => {
// any other stuff you may need to do before opening the screen.
window.AppInventor.setWebViewString(screenName);
}
Kodular blocks
are you talking about opening another html page or another Kodular screen?
Taifun
But this one opens another screen whatever link he is clicking.
Maybe I misunderstood in which area of the app we are. I thought the user is in web view and there is a button to another website page and instead of open this, the app should switch the screen.
Sorry, error when writing it. It worked perfect!
Thank you very much to the 3, it is already working it seems.
sorry for my english, itâs from google âŠ
I just tried this but clicking does nothing.
I have a question, in the JS replace âscreenNameâ with the name of my screen
Thank you all very much, I will try everything you tell me there, and I tell you how it went.
On which part of the area of the app is the home screen, a web viewer, with some buttons, which, when clicked, lead to another screen created.
You should replace SCREEN_NAME
with the name of your screen
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.