Reputation: 17671
I've built a Jquery Mobile Android App using Phonegap which contains a form with an on submit action which triggers the following script -
function searchThis() {
var inputDetails= $('.srchInput').val();
$('.srchRes').empty();
$('.srchRes').append('<iframe frameborder="0" scrolling="no" width="300" frameborder="0" src="http://uc.dialogue.net/srch.jsp?query='+inputDetails+'&searchMode=any&indexGroup=Default"></iframe>');
return false;
}
The function of the form works great - my problem is that when the form submit the app navigates to the homepage? I cant figure out why this is happening or how to stop it!?
Does anybody have any ideas?
Cheers Paul
Upvotes: 0
Views: 133
Reputation: 7450
It might be worth trying to use event.preventDefault(); as well as returning false, see if that helps.
Upvotes: 2