Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/388.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法通过IE中的javascript启动页面_Javascript_Jquery_Internet Explorer - Fatal编程技术网

无法通过IE中的javascript启动页面

无法通过IE中的javascript启动页面,javascript,jquery,internet-explorer,Javascript,Jquery,Internet Explorer,我有以下代码打开并初始化新窗口: var self = this; self.editorWindow = window.open("about:blank", "Edit_image"); //self.editorWindow.onload = function () { setTimeout(function () { $("body", self.editorWindow.document).append($.tmpl(

我有以下代码打开并初始化新窗口:

    var self = this;

    self.editorWindow = window.open("about:blank", "Edit_image");       

    //self.editorWindow.onload = function () {
    setTimeout(function () {

        $("body", self.editorWindow.document).append($.tmpl('Editor',{ name : img.name, albumName : FPP.Aggregator.Data[img.serviceId][img.albumId].name })).addClass("edit-page");

        var host = document.location.protocol + "//" + document.location.host;

        // Load jQuery into new window
        var head = self.editorWindow.document.getElementsByTagName('head')[0];
        var script = self.editorWindow.document.createElement('script');
        script.type = 'text/javascript';
        script.src = host + '/JS/Res/jquery.min.js';
        head.appendChild(script);

        // Load jQuery-ui into new window
        head = self.editorWindow.document.getElementsByTagName('head')[0];
        script = self.editorWindow.document.createElement('script');
        script.type = 'text/javascript';
        script.src = host + '/JS/Res/jquery-ui.min.js';
        head.appendChild(script);

        // Load jQuery-ui css into new window
        var link = self.editorWindow.document.createElement("link");
        link.setAttribute("rel", "stylesheet");
        link.setAttribute("type", "text/css");
        link.setAttribute("href", host + "/Design/Default/css/ui-lightness/jquery-ui-1.8.15.custom.css");
        head.appendChild(link);

        // Load stylesheets
        link = self.editorWindow.document.createElement("link");
        link.setAttribute("rel", "stylesheet");
        link.setAttribute("type", "text/css");
        link.setAttribute("href", host + "/Design/720/style.css");
        head.appendChild(link);

        // other things ...
    }, 400);
起初我是这样做的:

    var self = this;

    self.editorWindow = window.open("about:blank", "Edit_image");       

    // Init stuff
但这在FF(我正在开发的witch)中不起作用,所以我制作了这个

    var self = this;

    self.editorWindow = window.open("about:blank", "Edit_image");       

    self.editorWindow.onload = function () {
         // Init stuff
    }

但是它在Chrome中不起作用,所以我提出了第一个代码示例。它在IE中不工作。窗口已打开但未初始化。我不知道为什么,我也没有主意。

不,都是本地的。FF和Chrome也会给我一个错误。它在我的计算机上,在本地主机下。我正在从该域中的代码打开窗口,所有加载的文件也都在该域中。