Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kkachurak

macrumors regular
Original poster
Jun 26, 2007
215
26
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.
 

kkachurak

macrumors regular
Original poster
Jun 26, 2007
215
26
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 -->

onLoad="hideAddressbar()"
 

cmaier

Suspended
Jul 25, 2007
25,405
33,471
California
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 -->

onLoad="hideAddressbar()"

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)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.