ios - how to pass collection of data using an nsarray to a javascript function from Objective C code -


I'm trying to present both the HTML and the original Objective-C code together. My aim is to identify an html element (a button appears) and pressing the button will call the original (Objective C) warning. And I've successfully implemented it. Now I'm getting a Jason. Now from JSON, I want to send two objects back to Javascript, using Js Function being called from Objective-C. My question is if special characters (like \, '' etc.) And when I remove all the special characters from the string, I am able to call the function.

This is my code

  int i; (I = 0; i & lt; [arr number]; i ++) {image_path = [NSString stringWithFormat: @ "http: //new.my.anandabazar.com%@", [[arr Objektatindeks: i] valueForKey : @ "ImagePath"]]; Str_title = [NSString stringWithFormat: @ "% @ & lt; img src = \"% @ \ "& gt;", [[args Objektatindeks led] Velforः: @ "title"], Cvi_pth]; NSString * newVar = [[Stro_taitl Gtkonsperetedbiyractors Inset: [[Anssiarsiaractorsat letter Kantentsat] Inwartedsat]] Gtkonjonded Baitring: @ ""]; NSLog (@ "% @", newVar); [Array_data addObject: newVar]; - (void) webViewDidFinishLoad: (UIWebView *) webview {NSString * arrayStr = [array_data componentsJoinedByString: @ "" "]; NSString * jsFunc = [NSString stringWithFormat: @" data_abc ([ '% @']) ", Srnistret]; NSLog (@ "now array% @ is", [NSString stringWithFormat: @ "data_abc ([ '% @'])", arrayStr]); [webview Stringbiwayvluting Javskriptfremstring: Jesfnk];}   < P>  Here is my HTML code:   
   gt; Top & gt; & lt; / head & gt; & lt; Body & gt; & lt; ul id = "snippet">  



  

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -