Reputation: 153
What is the appropriate syntax for retrieving an HTML form's input text box "value" (ie, what the user has typed into the said field) ?
I've tried the <webkitControlName>.Document.GetElementById("email").GetAttribute("value").ToString()
but it always returns blank/empty/null, regardless of what has been typed into the field.
VS2012, .NET 4CP
Upvotes: 1
Views: 1552
Reputation: 190
This should do the trick.
var inputValue = <webkitControl>.StringByEvaluatingJavaScriptFromString("document.getElementById('email').value");
Upvotes: 2