tags:

views:

47

answers:

2

I am having problem while passing string argument using javascript injection in my android application.. I am using the

webview.loadUrl("javascript:(function() { " +
                        " document.getElementById()

, but m not getting the exact output..

I want to connect my login form (locally created) with website, so that whenever user enter userID & password in my login form, it automatically get added to that website login form..

please help me with some simplified sample code..

Thanks:

A: 

JavaScript is not Enabled as Default for the webview . you have to enable it like below

webview.getSettings().setJavaScriptEnabled(true);
Praveen Chandrasekaran
yes, i already enabled javascript.. still m stuck.. i want to bind the txtpassword field (which i have created) with yahoo login form passwprd field, so that enter to that field atonce get enter to yahoo page..
PPb
@PPb: then check my post.. http://stackoverflow.com/questions/2866212/webview-problem-on-youtube-site-in-android
Praveen Chandrasekaran
A: 

i chkd ur post but that did not solve my problem..

String pwd= "aa";
....
......
         webview.loadUrl("javascript:(function(arg1) { " +  
                    "document.getElementsById('username').value = arg1; " +  
                    "})()");  

        }
    });

what i want is that arg1 should take pwd value.. how to do that?

ppb