Reputation: 180
At this time I want just to pass a value with a variable and show it in a modal window, this variable contains a link
<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>
And the button is like that
<%= link_to('#',
:onclick => "return mostrar_supports('#{request.host_with_port}/supports');") do %>
<i class="wrenchicon-"></i> Soporte
<% end %>
So I just want to show in the modal window the content of the url I pass, but I clicked it and doesn't happen anything, it's works just when I write manually the link, what could I do to fix it
html: '<iframe src="../supports" style="width:100%;height:100%;border:none;"></iframe>'
Thanks for your help
Upvotes: 0
Views: 53
Reputation: 309
try this instead :
html: "<iframe src='" + link + "' style='width:100%;height:100%;border:none;'></iframe>"
});
Upvotes: 1