Hello Everyone, i am using webview on b4J and i tested this same code on B4A and on android it works well ... but on B4J no, there is something I can make it work? follow the code below:
when i click on " submit " on webview html ( B4J ) i get this below :
( as if the parameter1 parameter was not sent)
when i click on " submit " on webview html ( B4A ) i get this below :
B4X:
#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 600
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private xui As XUI
Private WebView1 As WebView
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1")
MainForm.Show
Dim we,wvjo As JavaObject
we.InitializeNewInstance("javafx.scene.web.WebEngine",Null)
wvjo = WebView1
we = wvjo.RunMethod("getEngine",Null)
Dim useragent As String=$"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0"$
we.RunMethod("setUserAgent",Array(useragent))
'WebView1.LoadUrl("http://www.whoishostingthis.com/tools/user-agent/")
WebView1.LoadHtml($"
<!DOCTYPE html>
<html>
<body>
<h1>The form method="post" attribute</h1>
<form action="https://mylink.com" method="post">
<input type="hidden" id="parameter1" name="parameter1" value="Testing">
<input type="submit" value="Submit">
</form>
</body>
</html>
"$)
End Sub
when i click on " submit " on webview html ( B4J ) i get this below :
( as if the parameter1 parameter was not sent)
when i click on " submit " on webview html ( B4A ) i get this below :