Is this possible in B4I I didn't find this property in Webview B4i , I need to set and get this offset property
can it be done with NativeObject if yes then how ?
thanks, but i didn't find anything i think , but i found some java script- code
in override url I get the scroll top with :
B4X:
Dim no As NativeObject = WebView1
Dim offset As Object = no.RunMethod("stringByEvaluatingJavaScriptFromString:",Array("document.body.scrollTop;"))
scroll_top =offset
Then in WebView1_PageFinished I want to set the scroll_top in WebView1_PageFinished with :
B4X:
This wil not work
Dim no As NativeObject = WebView1
no.RunMethod("stringByEvaluatingJavaScriptFromString:", Array("document.body.scrollTop ='scroll_top';"))
This works
no.RunMethod("stringByEvaluatingJavaScriptFromString:", Array("document.body.scrollTop =800;"))
But how do I get the value off scroll_top in this string ?
no.RunMethod("stringByEvaluatingJavaScriptFromString:", Array("document.body.scrollTop.value =scroll_top;"))
no not good
no.RunMethod("stringByEvaluatingJavaScriptFromString:", Array("document.getElementById('scrollTop').value ='scroll_top';"))
still not good