Inject an @ variable into src of an IFRAME
I have a dynamic url that I'm building in my controller to serve as the src of the IFRAME. I'm currently saving the url as @iframe_url. When I go to the IFRAME on the view I'm doing
<IFRAME src=<%=@iframe_url%>开发者_如何学Go />
to no avail. Can anyone help me out?
I'm not sure if this is the problem, but you should always enclose attributes in quotes:
<IFRAME src="<%= @iframe_url %>" />
Are you sure you're assigning the variable in the action/method you are executing to see the frame show up? Perhaps you could show some of your controller code?
精彩评论