The online racing simulator
Problem to update my profile
(4 posts, started )
Problem to update my profile
In LFS world
LFS racers database
Your profile

When I try to change something ( favorite car and my controller actually), i got a pop up message:

Notification : The "day" value of your birth date is invalid
and of course nothing is change on my profile

Date of birth 08 - 03 - 1980
Try just typing in "8" instead of "08".
Quote from AndroidXP :Try just typing in "8" instead of "08".

It worked thx a lot!
That's weird, cause i didn't touch the birth date, it was just written like this on my profile!
Victor, that's the old octal bug again.
function SEARCH_applyRacerPersonal () {
var bDay = (parseInt (document.getElementById('SEARCH_bDay').value) || 0);
var bMonth = (parseInt (document.getElementById('SEARCH_bMonth').value) || 0);
var bYear = (parseInt (document.getElementById('SEARCH_bYear').value) || 0);

if (!bDay || bDay > 31) {
messagePopup (4, "the 'Day' value of your birth date is invalid");
return;
}
if (!bMonth || bMonth > 12) {
messagePopup (4, "the 'Month' value of your birth date is invalid");
return;
}
if (!bYear || bYear > 2004 || bYear < 1900) {
messagePopup (4, "the 'Year' value of your birth date is invalid");
return;
}

That parseInt() sees strings with leading zero as octal values, and anything greater than 07 is invalid. Thus the resulting value of bDay is 0, and !bDay returns true. Strange that this hasn't been fixed, as I remember it being a problem a loooong time ago.

Problem to update my profile
(4 posts, started )
FGED GREDG RDFGDR GSFDG