开发者

Inject an @ variable into src of an IFRAME

开发者 https://www.devze.com 2022-12-17 02:31 出处:网络
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

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消