Patrick Alexson
Patrick Alexson

Reputation: 153

Get HTML input text value in webkit

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

Answers (1)

Vaelek
Vaelek

Reputation: 190

This should do the trick.

var inputValue = <webkitControl>.StringByEvaluatingJavaScriptFromString("document.getElementById('email').value");

Upvotes: 2

Related Questions