Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/66.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
Ruby on rails 带有变量ExtJS的函数_Ruby On Rails_Extjs - Fatal编程技术网

Ruby on rails 带有变量ExtJS的函数

Ruby on rails 带有变量ExtJS的函数,ruby-on-rails,extjs,Ruby On Rails,Extjs,此时,我只想用一个变量传递一个值,并在模式窗口中显示它,这个变量包含一个链接 <script type="text/javascript"> function mostrar_supports(link){ var link; var win = new Ext.Window({ title: 'Soporte Coprenal', width: 1000, height: 600, modal: true, html: "<i

此时,我只想用一个变量传递一个值,并在模式窗口中显示它,这个变量包含一个链接

<script type="text/javascript">
function mostrar_supports(link){
var link;
var win = new Ext.Window({
    title:  'Soporte Coprenal',
    width:  1000,
    height: 600,
    modal:  true,
    html:   "<iframe src="link" style='width:100%;height:100%;border:none;'></iframe>"
});

win.show();
return false;};
</script>

功能mostrar_支持(链接){
var-link;
var win=新的外部窗口({
标题:“Soport Coprenal”,
宽度:1000,
身高:600,
莫代尔:是的,
html:“
});
win.show();
返回false;};
按钮是这样的

             <%= link_to('#', 
                :onclick => "return mostrar_supports('#{request.host_with_port}/supports');") do %>
                <i class="wrenchicon-"></i>&nbsp;Soporte
            <% end %>
“返回mostrar_支持('#{request.host_with_port}/supports')))do%>
索波特
所以我只想在模式窗口中显示我传递的url的内容,但是我点击了它,没有发生任何事情,它在我手动编写链接时起作用,我能做些什么来修复它

html: '<iframe src="../supports" style="width:100%;height:100%;border:none;"></iframe>'
html:'
感谢您的帮助

请尝试以下方法:

html:   "<iframe src='" + link + "' style='width:100%;height:100%;border:none;'></iframe>"
html:“

}))

很乐意帮忙。祝你好运