B4A Tutorial [B4X] WebView + CKEditor (rich text editor) - Erel    
Oct 20, 2022   
(18 reactions) RunJavaScript (js As String) As ResumableSub
#if B4A
WebViewExtras1.executeJavascript... As String)
Return html
#Else If B4J
Return WebView1.As(JavaObject).RunMethodJO("getEngine", Null).RunMethod("executeScript", Array(js))
#Else If B4i
Dim sf As Object = WebView1.EvaluateJavaScript(js)
Wait For (sf) WebView1_JSComplete (Success As Boolean...
link: on RunJavaScript function
- We may need to Initialize WebViewExtras1...
Italian [ risolto] help su JavaScript injection - Xfood (first post)    
May 13, 2025   
(3 reactions) password
Private Sub Button1_Click
RunJavaScript($"document.getElementById("username").value="123";"$)
RunJavaScript($"document.getElementById("password...
RunJavaScript(JSx)
End Sub
Public Sub RunJavaScript (JSX As String) As ResumableSub
#if....As(JavaObject).RunMethodJO("getEngine", Null).RunMethod("executeScript", Array(JSX...
link: .getElementById("password").value="123";"$)
RunJavaScript...
B4J Question Click checkbox in webview and submit using javascript - TILogistic (first post)    
Jul 8, 2022   
(2 reactions)test checkbox 2: Check and Value
Edit:
'check').?????
Private Sub Button1_Click
RunJavaScript($"document.getElementsByClassName('check').checked = true;"$)
End Sub
Private Sub Button2_Click
RunJavaScript($"document.getElementsByClassName('check').checked = false;"$)
End Sub
Private Sub Button3_Click
Wait For (RunJavaScript...
link: Value and Checked
Private Sub Button3_Click
Wait For (RunJavaScript($"document...
B4A Question Save all webview content to clipboard - Erel (first post)    
Jan 4, 2024   
(1 reaction)Use the RunJavaScript sub: https://www.b4x.com/android/forum/threads/b4x-webview-ckeditor-rich-text-editor.133260/#content to execute JavaScript that gets the page source and then copy it to clipboard....
link:
Use the RunJavaScript sub: https://www.b4x.com/android/forum/threads/b4x-webview-ckeditor-rich...
B4A Question Wait for Javascript to complete - TILogistic (first post)    
Sep 14, 2021you can modify routine (RunJavaScript) to use WebViewExtras2 library...
link: = $"document.getElementById('${Parameter}').value"$
Wait For (RunJavaScript...
link: ').value"$
Wait For (RunJavaScript(Javascript)) Complete(Html As String)
Log(Html...
B4J Question Webview per Session/Client at JServer - Magma (first post)    
Sep 30, 2025 As String)
Sleep(2000)
wait for(RunJavaScript($"deleteItem('${myid}','${myCode}');"$)) complete (result1 As String) 'here i am running javascript of webpage...(RunJavaScript(jsConfirm)) Complete (result2 As String) 'clicking "YES" at confirmation...
B4A Question Richtexteditor - how they did it ? - Phayao (first post)    
May 10, 2023Thank you Erel,
that's true, nevertheless the function
Sub RunJavaScript (js As String) As ResumableSub
wvExtras.executeJavascript(wvEditor, $"B4A.CallSub('returnHTML', true, ${js})"$)
Wait For returnHTML(content As String)
Log("return = "& content... with a global variable HTML:
Sub RunJavaScript (js As String) As ResumableSub
wvExtras... it's not possible by B4A but using some Java function... ?
Maybe there's a trick around...
Italian Refresh Pagina in b4i - Star-Dust (first post)    
May 14, 2022
Il problema e che indirizzo non è sempre lo stesso.
dovrò indagare sullo scrolling al Top.
Grazie purtroppo sul mondo android ho più esperienza mentre in iphone meno
Basta che hai esperienza in JS
RunJavaScript("window.location.location.replace('www.xfood.it');")...
link: b4i, per b4x il codice è questo
RunJavaScript("window.location.reload();")
Private Sub...
link: )
RunJavaScript("window.location.reload();")
'Dim no...
B4i Question [Solved] b4i CallSub - jahswant (first post)    
Jun 28, 2024   
(1 reaction)Private Sub RunJavaScript (js As String) As ResumableSub
#if B4A
WebViewExtras1.executeJavascript(WebView1, $"B4A.CallSub('Process_HTML', true, ${js})"$)
Wait For Process_Html(html As String)
Return html
#Else If B4J
Return WebView1.As(JavaObject).RunMethodJO("getEngine", Null).RunMethod("executeScript", Array(js))
#Else If B4i
Dim sf As Object = WebView1.EvaluateJavaScript(js)
Wait For (sf) WebView1_JSComplete (Success...
B4J Question Difference in JS click() to mouseclick - TILogistic (first post)    
Aug 5, 2022?
B4X:
https://www.b4x.com/android/forum/threads/interact-with-html-elements-from-b4j-app.136957/#post-866558
https://www.b4x.com/android/forum/threads/click-checkbox-in-webview-and-submit-using-javascript.141650/#post-897876
https://www.b4x.com/android/forum/threads/wait-for-javascript-to-complete.134258/#post-849527
search:
https://www.b4x.com/android/forum/pages/results/?query=RunJavaScript+...
Page: 1  
2  
3  
4  
5  
6  
7