Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-28-2009, 11:45 AM   #2 (permalink)
ghayenga
Registered Member
 
Join Date: Mar 2009
Posts: 4
ghayenga is on a distinguished road
Default

Quote:
Originally Posted by chuck View Post
I have an app which has a UIWebView which is a quiz with dropdown boxes. At the bottom there is a button within the HTML which calls a JavaScript function to show which questions were answered correctly. At this point, I need to save the user's score. If all the questions are correct, I'd like to mark that that section is finished. Is there any way I could trigger an action from the UIWebView to the view controller when a user has answered all questions correctly? Any help would be greatly appreciated. Thanks!

In your JavaScript function call:

window.location = "MYDUMMYURL?";

Then in your webView's delegate implement the shouldStartLoadWithRequest method and then do whatever you need to and return NO if it's calling MYDUMMYURL.

- (BOOL)webViewUIWebView*)p_webView shouldStartLoadWithRequestNSURLRequest*)p_reques t
navigationTypeUIWebViewNavigationType)p_navigati onType
ghayenga is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,633
Threads: 94,090
Posts: 402,803
Top Poster: BrianSlick (7,990)
Welcome to our newest member, nor9849
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:12 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.