Front validator.js and 'first-child' of null. - Joomla! Forum - community, help and support
hello there,
i've faced error in jquery (which doesn't block form operation) , says popular:
uncaught typeerror: cannot read property 'firstchild' of null
it comes core.js in remove messages cannot find #system-message-container , called validation script. thing module not using standard form submit.
as far know validation add onclick event button has 'validate' class, id doesn't matter in case.
jquery code below:
i see popups on input fields saying it's not validated, error drops console, if feel form submitted ajax calls.
could give me clue what's going on?
ps:
i've tested native joomla contact form , behaves same way. seems core.js should rather check if system-container valid element. shows after standard validation redirection, @ place fail.
i've faced error in jquery (which doesn't block form operation) , says popular:
uncaught typeerror: cannot read property 'firstchild' of null
it comes core.js in remove messages cannot find #system-message-container , called validation script. thing module not using standard form submit.
as far know validation add onclick event button has 'validate' class, id doesn't matter in case.
jquery code below:
code: select all
(function($) {
$(document).ready(function(event) {
$('.qformform button[type="submit"]').click(function(event) {
event.preventdefault();
// find thisbutton parent form
var parentform = $(this).closest('form');
if (parentform.length == 0)
{
alert("qform error: cannot find parent form.");
return ;
}
var valid = document.formvalidator.isvalid($(parentform));
if (valid == false)
return ;
qformmodule.onqsubmit($(parentform));
});
});
})(jquery);
i see popups on input fields saying it's not validated, error drops console, if feel form submitted ajax calls.
could give me clue what's going on?
ps:
i've tested native joomla contact form , behaves same way. seems core.js should rather check if system-container valid element. shows after standard validation redirection, @ place fail.
this caused because system message container missing, add following code page:
i hope helps.
derek
code: select all
<div id="system-message-container"></div>
i hope helps.
derek
Comments
Post a Comment