Im trying to set a Text to a textarea within an UIWebView.
<textarea class="GFS3D5JBNW" style="padding: 4px;border-radius: 5px;" placeholder="Some placeholder text ..." title="Some Title ..." tabindex="1"></textarea>
the code i´ve tried
NSString *source = [NSString stringWithFormat:@"var inputFields = document.getElementsByTagName('textarea'); \
for (var i = inputFields.length >>> 0; i--;) { if(inputFields[i].tabindex == '1') inputFields[i].value = '%@';}", text];
[self.mainWebView stringByEvaluatingJavaScriptFromString: source];
or
NSString *source = [NSString stringWithFormat:@"var inputFields = document.getElementsByTagName('textarea').value = '%@';}", text];
[self.mainWebView stringByEvaluatingJavaScriptFromString: source];
but no success :-( Has anyone a hint for me?