Created
February 21, 2011 07:29
-
-
Save d6rkaiz/836774 to your computer and use it in GitHub Desktop.
JavaScript Alert & Confirm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message | |
{ | |
NSRunAlertPanel(@"JavaScript alert", message, @"OK", nil, nil); | |
} | |
- (BOOL)webView:(WebView *)sender runJavaScriptConfirmPanelWithMessage:(NSString *)message | |
{ | |
int choice = NSRunAlertPanel(@"JavaScript confirm", message, @"OK", @"Cancel", nil); | |
return choice == NSAlertDefaultReturn; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment