Bug? WebView PageFinished not firing

chrjak

Active Member
Licensed User
Longtime User
Hey Erel,
My Webview doesn't call the Website-loaded event (WebView1_PageFinished (Url As String)).
At Activity_Create I load a html, which redirects to another Page. And this Page isn't tracked from this Event.
Its very important for me that this bug gets fixed or i get a solution. I tried really everything.

Your fast help would be sooo great Erel! Thanks
 

chrjak

Active Member
Licensed User
Longtime User
It's built-in in a huge project. Sp I can't upload it. But I can give you the explanation:

It is a simple Webview and it has this html: (WebView1.LoadHtml(strhtml))

<html>
<head>
<script>
<!--
function login() {
document.form1.action="URL TAKEN OUT";
document.form1.submit();
}
//-->
</script>
</HEAD>
<BODY onLoad="login()">

<form NAME="form1" id=form1 method="post" >

<input type=hidden name="benutzerid" value="replacethis">
<input type=hidden name="passwort" value="N!U!L!L!">
</form>
</body>
</html>

And this html redirects to the Webpage. I added a Progress Dialog, which should be removed when the Page is loaded. But the Website pops up in the background and the event is not called to remove the Dialog. And to say to the user he should click somewhere to remove this dialog is not the best solution :D
 

chrjak

Active Member
Licensed User
Longtime User
Its here: Follow instructions about the private message. Thanks
 

Attachments

  • ExampleProject.zip
    7.3 KB · Views: 190

Erel

B4X founder
Staff member
Licensed User
Longtime User
(Why do you read the html to a list?)

I've tested it with this code:
B4X:
Sub Activity_Create(FirstTime As Boolean)
   'Do not forget to load the layout file created with the visual designer. For example:
   Activity.LoadLayout("start")
   WebView1.LoadHtml(File.ReadString(File.DirAssets, "autolog.htm"))
End Sub

Sub WebView1_PageFinished (Url As String)
   Log("pagefinished: " & Url)
End Sub

This is the output:
SS-2014-10-07_08.16.26.png
 

chrjak

Active Member
Licensed User
Longtime User
here is only 2 times the file:///

and then nothing.
 
Top