I am filling the user name box automaticly in webview application. But ı need to fill the blanks with wariable which defined in java code here is my code. I want to use variable in my java code instade of "PASS" and "NAME"
javascript:
document.getElementById('horde_user').value='NAME';" +"javascript:document.getElementById('horde_pass').value='PASS';"
java:
final String js = "javascript:document.getElementById('horde_user').value='NAME';" +"javascript:document.getElementById('horde_pass').value='PASS';"+"javascript:documentgetElementsByName('login_button')[0].click()";
webview.setWebViewClient(new WebViewClient() {
public void onPageFinished(WebView view, String url){
if(Build.VERSION.SDK_INT >= 19){
view.evaluateJavascript(js, new ValueCallback<String>() {
@Override
public void onReceiveValue(String s) {
}
});
}
}
});