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> 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:“
})) 很乐意帮忙。祝你好运