javascript - JS: Function somehow blocks another function -
as title says - 1 function somehow blocks another,i got input:
<input type="submit" name="submit" value="submit" id="submit" onmouseover="onsubmithover()" onmouseout="submitfadeout()" /> when delete onmouseover function onmouseout starts work need.
here functions: onmouseover:
function onsubmithover() { var emailstatus = document.getelementbyid("emailstatus").innerhtml; var passwordstatus = document.getelementbyid("passwordstatus").innerhtml; var usernamestatus = document.getelementbyid("usernamestatus").innerhtml = ""; if((emailstatus == "this email available")&&(passwordstatus != "too short")&&(passwordstatus != "")&&(usernamestatus != "this username available")) { document.getelementbyid("submitnote").innerhtml = "submit data"; document.getelementbyid("submit").disabled = false; } else { document.getelementbyid("submitnote").innerhtml = "please fill in required [*] fields"; document.getelementbyid("submit").disabled = true; } } onmouseout:
function submitfadeout() { document.getelementbyid("submitnote").innerhtml = ""; } the problem: when move mouse out of button,i want "submitnote" empty, first function somehow blocks it,i'm not sure how, or maybe it's deep error illustration maybe i'm asking 2 functions @ 1 time impossible know.
javascript function
No comments:
Post a Comment