Can the address bar in SeedcodeIWP on iPhone hide?

Support for our integrated Contact Manager, Calendar, and Project Tracker.
Posts: 28
Joined: Sat Nov 10, 2007 6:33 pm
Location: Beaverton, OR
PostPosted: Sat Apr 05, 2008 11:44 am
Is it possible to hide the address bar on the iPhone and more screen space? I've seen this on other iPhone aware websites. Is that possible with IWP?

Thanks.
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Mon Apr 07, 2008 8:51 am
Hi there. Hiding the address bar would require editing the javascript in the IWP homepage. I've done this before for a couple other things, but never to remove the address bar. Needless to say, FileMaker doesn't support modifying this kind of stuff, but let me look into what it would take to do this.
John Sindelar
SeedCode
Posts: 28
Joined: Sat Nov 10, 2007 6:33 pm
Location: Beaverton, OR
PostPosted: Mon Apr 07, 2008 9:18 am
This article references

http://www.alistapart.com/articles/puty ... ocketpart2

references a script in JavaScript, I think, that will hide the address bar. I want to do this because, after you login, you really can't use Safari's reload button or need access to the address bar. And it give more real estate.

The script is window.scrollTo(0,1)

Hope that helps.

Tom
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Mon Apr 07, 2008 11:47 am
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>
John Sindelar
SeedCode
Posts: 28
Joined: Sat Nov 10, 2007 6:33 pm
Location: Beaverton, OR
PostPosted: Tue Apr 08, 2008 10:06 am
I edited the files you suggested but I didn't see any change. Is there a specific place in the file I need to insert the script code you provided? I put the new code at the end of the existing script sections.
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Tue Apr 08, 2008 11:33 am
You want to put them in the <head>, ideally ahead of any <script> sections already there. Unfortunately I'm not in a position to play with this currently, but hopefully you can fool around with this and see what works.
John Sindelar
SeedCode

Return to SeedCode Calendar

Who is online

Users browsing this forum: Google [Bot] and 3 guests

cron
(855) SEEDCODE
[email protected]
Follow us: