I'm using QGraphicWebView to load "index.html" from QResource.
view->load(QUrl("qrc:/html/index.html"));
On the index.html I'm loading "myscript1.js"
<script language="javascript" type="text/javascript" src="qrc:/javascript/myscript1.js"></script>
On "myscript1.js" I'm dynamically trying to load "myscript2.js" also from QResource. But on this case with no success?
var url = 'qrc:/javascript/myscript2.js'
jQuery.ajax(
{
async: true,
cache: true,
dataType: "script",
type: "GET",
url: url,
error: function(data) {
console.log('EC.loadERROR:'+url);
},
success: function() {
console.log('EC.loadSUCCESS:'+url);
},
complete: function() {
}
});
Printing out window.location I got:
host = ""
hostname = ""
protocol = "qrc:"
pathname = "/html/index.html"
Suggestions are welcome!!

Reply With Quote


