Hijacking submit
Hijacking submit
Hello,
I am trying to hijack a submission form and check the elements then submit it if it passes. I have gotten it to work in firefox but not in chrome or safari. Here is my code:
- $("#form").submit(function(e) {
if(citySuggestRan) {
if($("#movie-theater-search").valid()) {
if($('#geocode-response ul#results').length > 0){
return false;
} else {
return true;
}
} else {
return false;
}
}else{
$("input#theater-location").bimGoogleGeoCode({mapKey : "$mapKey"}, function() {
if($("#movie-theater-search").valid()) {
if($('#geocode-response ul#results').length > 0){
return false;
} else {
return true;
}
} else {
return false;
}
})
}
});
Any one have any experience with this or a suggestion. It seems like the return statements are never being reached in chrome, I have tried preventing the default action at start but that keeps the return statements from happening.
Thanks a bunch,
Cory