Try adding the script below to the head section of iwp_home.html. I believe you also need to add this to some of the iwp engine pages directly. These are in different places depending your server and OS so you'll have to find them on your own.
When publishing on a mac using FileMaker client they are in the Package Contents of the FM Web Publishig applications in Contents / Resources / iwpres. I'd add it to:
control_frame.html
iwp_auth.html
and
iwp_home.html
Obviously modify these files at your own risk.
- Code: Select all
<script type="application/x-javascript">
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
addLoadEvent(updateLayout);
var currentWidth = 0;
function updateLayout()
{
if (window.innerWidth != currentWidth)
{
currentWidth = window.innerWidth;
var orient = currentWidth == 320 ? "profile" : "landscape";
document.body.setAttribute("orient", orient);
setTimeout(function()
{
window.scrollTo(0, 1);
}, 100);
}
}
setInterval(updateLayout, 400);
</script>