How could I have an iframe that shows the target page and all it's elements at 50% scale?
My first thought was trying to write a css scale property to the frame, but I'm not sure if you can write css to the contents of the frame.
Thanks!
How could I have an iframe that shows the target page and all it's elements at 50% scale?
My first thought was trying to write a css scale property to the frame, but I'm not sure if you can write css to the contents of the frame.
Thanks!
Since the page is in the same domain, you might be able to place this code:
<script type="text/javascript">
if (location.href != top.location.href) {
// the page is loaded inside an iframe so
// Make everything 50% scale (I'm not sure what the code for that is in pure js)
// With jQuery:
$("*").css("zoom","50%");
}
</script>
In the head of the page you are loading in the iframe.
If you're not using JQuery, this page
http://pietschsoft.com/post/2006/06/01/Javascript-Loop-through-all-elements-in-a-form.aspx
has a good example of how to loop through all the elements in a form without a library like JQuery.
Easier then I thought...
<iframe id="frame"></iframe>
$('#frame').css
'-webkit-transform': 'scale(.5)'
'-moz-transform': 'scale(.5)'
'-o-transform': 'scale(.5)'