iPhone Web Page Development

Discussion in 'Jailbreaks and iOS Hacks' started by kkachurak, Jul 19, 2007.

  1. kkachurak macrumors regular

    Jun 26, 2007
    Orlando, FL
    I know the last thing anyone wants to do is carry some newbie through a bunch of information, but I really am trying to learn on my own by looking at examples and reading through resources.

    Can anyone direct me to a good site/resource that can assist me in the development of my basic iPhone apps?

    Also, if anyone can let me know what the basic javascript command is to hide the nav bar once your page loads? I've been searching all night and can't figure that out.
  2. kkachurak thread starter macrumors regular

    Jun 26, 2007
    Orlando, FL
    Okay so in the spirit on answering my own question, I found this:

    This code gets placed in the <script> tag -->

    function hideAddressbar()
    window.scrollTo(0, 1);

    And this gets placed in the <body> tag -->

  3. cmaier macrumors G4

    Jul 25, 2007
    A couple of caveats:

    1) it only works if the page is long enough to scroll. You may have to do something like throw <div style="height: 30px"> </div> in to pad out the length of the page

    2) i've found that I've sometimes had to delay the scrollto until the rest of the page is drawn. This can be done with a setTimeout("hideAddressbar()",250) (you may need to modify the delay)

Share This Page