I want to use stringByEvaluatingJavaScriptFromString to run a javascript which references local files (in this case css files, but potentially js files too) which are on the device (in the Documents folder I guess?)...
NSString *theJS = [[NSString alloc]
initWithString:@"javascript:(function()
{the_css.rel='stylesheet';
the_css.href='the_css.css';
the_css.type='text/css';
the_css.media='screen';}
)();"];
[webView stringByEvaluatingJavaScriptFromString:theJS];
How would I get this to work? It works fine if I use an external css file, like
the_css.href='http://www.website.com/the_css.css';