Home › Forums › JavaScript › Validation › Re: Validation
December 7, 2011 at 8:03 am
#92105
jamygolden
Member
I don’t understand what you mean. What are you trying to do and what is not working?
If you find this:
$('#next').bind('click',function(e){
var $this = $(this);
$('#navigation li:nth-child(' + (parseInt(current)+1) + ') a').click();
/* force the blur for validation */
$(this).blur();
e.preventDefault();
});
And replace it with this:
$('#next').bind('click',function(e){
if($('.step').eq(current - 1).find('.required').val() == '' ){
alert('Please correct the errors in the Form. Make sure you have filled in all fields correctly - this makes it quicker for us to process your request. Please note we do log all IP addresses of submissions.');
return false;
}
var $this = $(this);
$('#navigation li:nth-child(' + (parseInt(current)+1) + ') a').click();
/* force the blur for validation */
$(this).blur();
e.preventDefault();
});
It will stop you from progressing