Hello
I'm trying to insert the current date into a page loaded (at end) into a webviewextras, but the code below is not working.
Can someone help me? I'm not very familiar with javascript...
I'm trying to insert the current date into a page loaded (at end) into a webviewextras, but the code below is not working.
Can someone help me? I'm not very familiar with javascript...
B4X:
Sub WebView1_PageFinished (Url As String)
Dim javascript2 As StringBuilder
javascript2.Initialize
javascript2.Append("var toInsert = document.createElement('div');")
javascript2=javascript2.Append("var today = new Date().toLocaleDateString();")
javascript2=javascript2.Append("toInsert.innerHTML =today;")
javascript2=javascript2.Append("document.body.appendChild(today);")
WebView1.ExecuteJavascript(javascript2)
End Sub