ios - Call Javascript Function with multi-line string from UIWebView -


i using d3.js create chart information in form of tsv file. have tsv file saved nsstring. in javascript have function take string, parse it, , create chart based on contents. here code calling js function:

[self.mainwebview stringbyevaluatingjavascriptfromstring:[nsstring stringwithformat:@"parsetsv(\"%@\");", tsvstring]]; 

the function never called in above code, if pass in random string literal this:

[self.mainwebview stringbyevaluatingjavascriptfromstring:@"parsetsv(\"randomstring\")"]; 

is possibly because js doesn't take string multiple lines function argument? there workaround this?

thanks.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -