This expression doesn't seem to work. It's with a Mac application, not an iPhone app.
[[mainWebView mainFrame] stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"document.getElementById('username').value='%@';document.getElementById('password').value='%@';", [ebuddyidField value], [passwordField value]]];