Joshua,
here's a couple more links regarding a way to get the phone's current location with your javascript function.
Geolocation API on the iPhone - Stack Overflow
it looks like iPhone might now (3.0) support this without 3rd-party apps or javascript libraries:
Safari Dev Center: Safari Web Content Guide: Getting Geographic Locations