OK - what I suggested you do was...
All of it can be included into one string with the value added at the end, but better still will be to put it into the open method bypassing the variables altogether.
What that means is a two step process:
1: take this
var likePath = "/Moms/babyNames/";
var likeFile = likePath + "likeBabyName.php" ;
var likeURL = likeFile + '?name='+ value;
turn it into this....
var likeURL = "/Moms/babyNames/likeBabyName.php?name=" + value;
NOW use that into you open method as before....
2: take this
likeURL = "/Moms/babyNames/likeBabyName.php?name=" + value;
and do this....
xhr.open("GET","/Moms/babyNames/likeBabyName.php?name=" + value, true);
maybe you do not need to slash in front of Moms
I DO NOT KNOW you file structure so YOU have to determine if that path is correct...and that I believe is the cause of your error.... SO CHECK IT please...