I have a php page the verifies the username users type in, and echo's back "available!" if its available into a div called "feedback". now I have this JavaScript that I want to check to see if the "feedback" div says "available! and echo "username good" into the "check" div if it is. but it doesn't work and i don't know why.
<script type='text/javascript'>
function check_info(){
var username_good = document.getElementById('feedback').value;
if(username_good == "available!"){
document.getElementById("check").innerHTML = "username good";
}
else{
document.getElementById("check").innerHTML = "bad";
}
}
</script>