Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.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
Extjs 我想在单击图像时在ext.js模式窗口中显示图像_Extjs_Modal Dialog - Fatal编程技术网

Extjs 我想在单击图像时在ext.js模式窗口中显示图像

Extjs 我想在单击图像时在ext.js模式窗口中显示图像,extjs,modal-dialog,Extjs,Modal Dialog,我有一个通过xls处理的文件,它被转换为HTML并呈现为Extjs。我的问题是图像链接在xls中。单击图像时,我无法看到图像,因为它的iamge URL没有通过函数调用调用 我怎样才能得到它? 这是我的密码-- Extjs:- var showModal = function(url){ var previewWindow = new Ext.Window({ modal:true, border:false, plain:true,

我有一个通过xls处理的文件,它被转换为HTML并呈现为Extjs。我的问题是图像链接在xls中。单击图像时,我无法看到图像,因为它的iamge URL没有通过函数调用调用

我怎样才能得到它? 这是我的密码--

Extjs:-

var showModal = function(url){   
    var previewWindow = new Ext.Window({
        modal:true,
        border:false,
        plain:true,
        width:500,
        height:500,
        constrain:true,
         html:'<div style="width:500px;height:500px;"><img src="url"></div>',
        resizable:{preserveAspectRatio: true}
    });
    previewWindow.show();
};
var showmodel=函数(url){
var previewWindow=新的外部窗口({
莫代尔:是的,
边界:错,
朴素:没错,
宽度:500,
身高:500,
对,,
html:“”,
可调整大小:{preserveSpectratio:true}
});
previewWindow.show();
};
Xls代码:-

  <xsl:when test="@align='left'">
    <div class="imageleft">
        <img width="{$image_width}" height="{$image_height}"
          class="image" src="vll/getImage?resource={$image_ref}" 
          onClick="showModal('vll/getImage?resource={$image_ref}')" >
                <xsl:apply-templates/>
        </img>
    </div>
</xsl:when>

正如您在语法突出显示中看到的,您使用的不是变量,而是字符串“url”。请尝试以下操作:

html:'<div style="width:500px;height:500px;"><img src="'+url+'"></div>',
html:“”,

并获得一个带有语法高亮显示的编辑器,例如
Notepad++
(它还具有在ExtJS开发中有用的其他功能,如目录中的搜索和替换)。

正如您在语法高亮显示中看到的,您使用的不是变量,而是字符串“url”。请尝试以下操作:

html:'<div style="width:500px;height:500px;"><img src="'+url+'"></div>',
html:“”,
并获得一个带有语法高亮显示的编辑器,例如
Notepad++
(它还具有在ExtJS开发中有用的其他功能,如目录中的搜索和替换)