javascript - jQuery .load is not loading a local html file inside a Cocoa WebView -


i have cocoa webview displays local html file. i'm trying use jquery.load() load local html file div. javascript code goes this:

$("#mydiv").load("test.html");  // test.html local file inside app's bundle 

i don't see exceptions not load html inside div. i'm using same code ios app, , works fine. i've tried using xmlhttprequest() , can see responsetext fine.

any advice? in advance!

i able around problem using jquery.ajax instead. here's how did it:

jquery.ajax({       url: "test.html", datatype: "html"  }).done(function( responsehtml ) {      $("#mydiv").html(responsehtml); }); 

hope helps someone!


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -