I looked at a lot of the documentation from apple but I still can't seem to grasp the general idea of how to implement my javascript function into the webview.
I want to use javascript to fill in the form (username and password) and submit the forms.
In the console, I've been using the script:
javascript:(function() {
document.lform.in_tx_username.value='username';
document.lform.in_pw_userpass.value='password';
doLogin();
})()
Obj-c code look something like this:
loginScript = @"function() {document.lform.in_tx_username.value='username';
document.lform.in_pw_userpass.value='password';
doLogin();}";
[_visibleWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:scheduleURL]]];
[_visibleWebView stringByEvaluatingJavaScriptFromString:loginScript];
where scheduleUrl is the url i linked above. I am pretty new to both Obj-C and JS so any help/tips would be appreciated.