ajax - Find string in httpxml.responseText -
I'm down to my code which I find "User Name OK 'in respone text, and then username for OK Flag as truthful. I'm not getting this job.
function check_username (username) {var httpRequest; Make_request () function stateck () {if (httpxml.readyState == 4) {if (httpxml.responseText == "username is ok") {UserNameOk = true; } And {UserNameOk = false; } Checkscript (); Document.getElementById ("user_div") innerHTML = httpxml.responseText. }} Httpxml.onreadystatechange = Static; User_url = "ajax_username.php? Username =" + username.value; Httpxml.open ("GET", USER_URL, true); Httpxml.send (zero); } Below is my Chekkansmit code
function Czech Submit () {if (Ughrnemok & amp; and & amp; Password Oak & amp; email awk ) {Document.getElementById ("button"). Disabled = false; } And {document.getElementById ("button"). Disabled = true; }} Any help would be appreciated thanks.
Just one guess: the response "something like username \ n" (\ '\ n 'Being a new character you can not see). Or it may be white or white in the beginning or end, you can print the length of the string (warning) to test.
Comments
Post a Comment