I have made a login form in html/javascript to be injected into a UIWebView in my iPhone application. This all works really well and the login works. But when I press the login button it goes to the expected page within that view.
I was wondering if I could inject some objective c or by ways of a javascript do a modalView or dismissView to have upon the login have the page go to the application.
In the Application I have just made the UI of the webpage more user friendly.
So to kind of show what I am asking I have pasted some code.
NSString *myHTML = @"<form action="gotowebsite.com" onSubmit='return !validateLogin();'><input some textfield><input password field>";
Now I am imagining that the dismissal code will go into the onSubmit area.
Am I on a possibly good track??
Cheers Jeff
Implement
UIWebViewDelegatein your class and on successful login redirect your page to a url like login://successwhen you redirect your page, UIWebview will start loading request and the call the function written below.