0

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 .

Community
  • 1
  • 1

3 Answers3

1
NSString *param =@"Mango";       
[webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"JSMethod('%@')", param]];
Mike Samuel
  • 118,113
  • 30
  • 216
  • 245
Murali
  • 188
  • 1
  • 11
0

This may help you to solve your query:

[webView stringByEvaluatingJavaScriptFromString:@"myJSFunction()"];
Akshay Shah
  • 1,120
  • 6
  • 13