My field dates this Undefined

Asked

Viewed 38 times

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......

  • 1

    Probably nothing is being passed to this date variable. It would be better to send Html and PHP for ease.

  • yes, put the html there to check

  • I got it! Thank you guys

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.