--
You received this message because you are subscribed to the Google Groups "jscrollpane" group.
To post to this group, send email to jscro...@googlegroups.com.
To unsubscribe from this group, send email to jscrollpane...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jscrollpane?hl=en.
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<link type="text/css" href="jquery.jscrollpane.css" rel="stylesheet" media="all" />
<script type="text/javascript" src="jquery.mousewheel.js"></script>
<script type="text/javascript" src="jquery.jscrollpane.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#pane').jScrollPane();
});
</script>
</head>
<body>
<div id='pane' style="width:300px;height:400px;overflow:hidden;">
<iframe id="frame" frameborder=0 src='other.html' width='100%' height='1900px' scrolling="no"/>
</div>
</body>
</html>
The other.html is a lorem ipsum bit, about 1900px high at that width. The problem is that you can not access frame.document.body to get the height. If you can inject some javascript to the pages viewed, you could do this:
http://benalman.com/code/projects/jquery-postmessage/examples/iframe/
or this:
http://stackoverflow.com/questions/153152/resizing-an-iframe-based-on-content
or
http://geekswithblogs.net/rashid/archive/2007/01/13/103518.aspx (same message passing)
But as it is you are stuck with getting the height with some other means (if unable to inject content).
To post to this group, send email to jscro...@googlegroups.com.
To unsubscribe from this group, send email to jscrollpane...@googlegroups.com.
To post to this group, send email to jscro...@googlegroups.com.
To unsubscribe from this group, send email to jscrollpane...@googlegroups.com.
var doc = this.contentDocument || this.contentWindow.document;
as the doc is undefined, because of the security restrictions.
To post to this group, send email to jscro...@googlegroups.com.
To unsubscribe from this group, send email to jscrollpane...@googlegroups.com.