Possible Duplicate:
iOS JavaScript bridge
i am having one webview and one UIButton . i want to make javascript call from native code . How can i be able to do that .
Possible Duplicate:
iOS JavaScript bridge
i am having one webview and one UIButton . i want to make javascript call from native code . How can i be able to do that .
NSString *param =@"Mango";
[webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"JSMethod('%@')", param]];
This may help you to solve your query:
[webView stringByEvaluatingJavaScriptFromString:@"myJSFunction()"];