So here's the code I have so far which basically renders an iframe that contains a URL.
<title>Test Layout</title>
<style type="text/css">
body, html
{
margin: 0; padding: 0; height: 100%; overflow: hidden;
}
#content
{
position:absolute; left: 0; right: 0; bottom: 0; top: 0px;
}
</style>
<div id="content">
<iframe width="100%" height="100%" frameborder="0" src="http://jcrew.com" />
</div>
What I want to do is instead of passing a URL into the iframe, I want to pass a HTML file (with CSS in it) and just display that. So I'll pass raw HTML (could be a String) and I want the iframe to contain that. Any ideas?
I'm also using rails for the rest of my web app. I'm working with a home.html.erb file.
Is there a way to do this without using Javascript? If not, how do I get Javascript to work in my Rails app?
Thanks.