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 .
Follow these links. Using an html button to call a javascript function
http://devlicio.us/blogs/sergio_pereira/archive/2009/02/09/javascript-5-ways-to-call-a-function.aspx
http://www.webmasterworld.com/javascript/3749371.htm?highlight=msg3753441
These may help
NSString *param =@"Mango";
[webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"JSMethod('%@')", param]];
This may help you to solve your query:
[webView stringByEvaluatingJavaScriptFromString:@"myJSFunction()"];