Top of the page
Close

This is a red error

This is a red error

This is a red error

Calling a javascript function in your UIWebView from Objective-C

Ondrej Rafaj on 2009.08.19 12:34:37

This snippet may help you if you have some, for example SVG content, in your web view (UIWebView) and you want to call some specific javascript function from it.
NSString *jsCommand = [NSString stringWithFormat:@"callSomeJavasctiptFunction(%d, %d, %d);", @"parameter1", @"parameter2", @"parameter3"];
[self.webView stringByEvaluatingJavaScriptFromString:jsCommand];

Ondrej Rafaj

Ondrej Rafaj

Independent iPhone developer @ ondrej-rafaj.co.uk

I am available to give you a free quote or start working on your project ... just give me a call or drop a line. Please find all my details on my portfolio site ondrej-rafaj.co.uk

Back to top Comment

Comments ... Why not to get involved!

We had to disable comments till the problem with spam will be solved, sorry for any inconvenience caused.

Back to top

IE SUCKS, DON'T USE IT :) Digg this page