Reputation: 399
So I have this line of code:
myWebview.loadUrl("javascript:document.getElementById('join_confirm_email').value='[email protected]';void(0);");
for the value inside the javascript injection ([email protected]), I want to use a variable written inside my onCreate method. Is this possible? If it is, how can I do it?
Upvotes: 0
Views: 266
Reputation: 3766
Something like that.
String emailSTR = "[email protected]";
myWebview.loadUrl("javascript:document.getElementById('join_confirm_email').value='"+emailStr+"';void(0);");
Upvotes: 1