title: Raphael JavaScript Library on iPhone
body: <p>I've included the Raphael JavaScript library into an iPhone project, however I'm not able to get it to work in a webview. I have a basic test where I should get a red circle. It works on Safari on the Mac but I can't get it to work on the iPhone simulator. I only get the "Hello This is a Raphael Test" text.</p>
  
  <p>When I "Show Package Contents" on the app file in the Debug-iphonesimulator it shows that the JavaScript files are included.</p>
  
  <p>I'm obviously not doing something right. Any ideas?</p>
  
  <p>Below is the viewDidLoad content.</p>
  
  <pre><code> - (void)viewDidLoad {
     [super viewDidLoad];
  
     NSString *htmlPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"TestRaphael.html"];
     NSString *htmlContent = [NSString stringWithContentsOfFile:htmlPath encoding:NSUTF8StringEncoding error:nil];
  
     [myWebView loadHTMLString:htmlContent baseURL:nil];
  }
  </code></pre>
  
  <p>Below is the TestRaphael.html file.</p>
  
  <pre><code>&lt;html&gt;&lt;head&gt; 
  &lt;title&gt;Raphael Test&lt;/title&gt; 
  &lt;script src="raphael.js" mce_src="raphael.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt; 
  &lt;/head&gt; 
  &lt;body&gt; 
     &lt;H1&gt;Hello&lt;/H1&gt;
     &lt;P&gt;This is a Raphael Test&lt;/P&gt;
  &lt;script language="javascript" type="text/javascript"&gt; 
  
  var paper = Raphael(10, 50, 320, 200); 
  var circle = paper.circle(50, 40, 10); 
  circle.attr("fill", "#f00"); 
  circle.attr("stroke", "#fff"); 
  
  &lt;/script&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>