hi guys, i'm new to the asp.net mvc, and while working on this, i used very basic asp.net mvc stuff like beginform, etc.
i used a lot of jquery codes this round for client side validation, ajax data retrieval, and other gui works.
and i used a combinations of html inputs buttons, etc and the asp.net mvc type of controls. what i noticed is that whenever i click on a button control, which sometimes are tied to either jquery oclick events, when there's a javascript error, the page will just go on and submit.
why is this happening and what am i missing here?
my bad for the dumb questions.. thanks
Updates
After poking around, i think i might have found out why... could it be because i put some jquery event handlers inside another function and didn't return false?
function eventHandling() {
//initialize controls
$(".dobPicker").datepicker({
changeMonth: true,
changeYear: true,
yearRange: '-100:+0'
});
$("a#hrefCountry").fancybox({
'titlePosition': 'inside',
'width': '75%',
'height': '75%'
});
//Event handlers part
$("#imgbtnClear").click(function() {
clearForm("#frmProductRegistration");
return false; // like this guy weren't there initially <-- ??
});
And if this was the root cause, why? care to share :)