0
My date field in php when I give Alert appears as Undefined, how to fix?
var menuid = $("#menuid").val();
var date = $("#fundation-date").val();
var cnpj = $("#cnpj").val();
var latitude = $("#latitude").val();
var longitude = $("#longitude").val();
var link = $("#link").val();
var newLink = $("#newLink").val();
var site = $("#site").val();
var facebook = $("#facebook").val();
var instagram = $("#instagram").val();
var googleplus = $("#googleplus").val();
var pinterest = $("#pinterest").val();
alert(link + '- -' + newLink);
alert(menuid);
if (link !== newLink) {
if (link === null || link === '') {
$("#link").addClass("input-required");
moreInformations = false;
}else{
repeatLink();
}
}
alert(date);
alert(cnpj);
alert(latitude);
alert(longitude);
alert(site);
alert(facebook);
alert(instagram);
alert(googleplus);
alert(pinterest);
He can catch them all, the date passes as Undefined......
Probably nothing is being passed to this date variable. It would be better to send Html and PHP for ease.
– Flavio Misawa
yes, put the html there to check
– Jasar Orion
I got it! Thank you guys
– Ana Carolina Ribeiro