Have a look at this:
Location permission alert on iPhone with PhoneGap
The second one seems to be the Webkit alert. In order to prevent this, you seem to have to simply move all your js files to the root directory. Tell me, if it works since I'll have to address the same issue soon.